Closed borkdude closed 2 years ago
I actually found that this works pretty well as a testing function for small snippets, let's go with that to test things in the small:
(defn eval! [expr] (js/eval (doto (t/transpile-form expr) prn)))
Currently running tests in the REPL like this:
clj -M:cljs -m cljs.main -re node
(require '[cherry.transpiler] :reload '[cherry.transpiler-test] :reload) (cljs.test/run-tests 'cherry.transpiler-test)
Running "corpus" tests like this:
ls corpus/*.cljs | xargs -L 1 node --experimental-fetch ./node_cli.js run
Right now there are informal tests in "corpus". I think we could make each script return true or else throw an exception or so and then run these in CI as a way of testing.