Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Oct 30, 2023
1 parent e50ccd4 commit 2ac4129
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/sci/core_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -1670,12 +1670,12 @@
#?(:clj
(let [output (java.io.StringWriter.)]
(is (= 1 (sci/binding [sci/out output] (sci/eval-string "(time 1)"))))
(is (re-matches #"\"Elapsed time: \d\.\d+ msecs\"\s+" (str output))))
(is (re-matches #"\"Elapsed time: \d\.\d+ msecs\"\s*" (str output))))
:cljs
(let [output (atom "")
print-fn #(swap! output str %)]
(is (= 1 (sci/binding [sci/print-fn print-fn] (sci/eval-string "(time 1)" {:classes {'js js/globalThis :allow :all}}))))
(is (re-matches #"\"Elapsed time: \d\.\d+ msecs\"" @output))))
(is (re-matches #"\"Elapsed time: \d\.\d+ msecs\"\s*" @output))))
)

;;;; Scratch
Expand Down

0 comments on commit 2ac4129

Please sign in to comment.