rcf
rcf copied to clipboard
rcf/set-timeout! not having effect at node REPL
(ns dustin.y2021.hello_node_repl
(:require [hyperfiddle.rcf :as rcf :refer [tests ! %]]
["plaid" :as plaid-api]))
(hyperfiddle.rcf/set-timeout! 100)
(tests
hyperfiddle.rcf/*timeout* := 100
(defn setTimeout [f ms] (js/setTimeout ms f))
(rcf/! 1) (setTimeout 10 (fn []
(rcf/! 2) (setTimeout 200 (fn []
(rcf/! 3)))))
% := 1
% := 2
% := ::rcf/timeout)
✅
✅
✅
❌ dustin/y2021/hello_node_repl.cljs:6:1
in %42888
expected: :hyperfiddle.rcf/timeout
actual: 3
Directly configuring :timeout works:
(tests {:timeout 100}
hyperfiddle.rcf/*timeout* := 100
(defn setTimeout [f ms] (js/setTimeout ms f))
(rcf/! 1) (setTimeout 10 (fn []
(rcf/! 2) (setTimeout 200 (fn []
(rcf/! 3)))))
% := 1
% := 2
% := ::rcf/timeout)
✅
✅
✅
✅