File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5656 (is (str/includes? emitted " var add = function" ) " macro expanded inline — add defn emitted" )
5757 (is (str/includes? emitted " var mul = function" ) " macro expanded inline — mul defn emitted" ))))
5858
59+ (deftest cljc-macro-via-require-runs-test
60+ (let [dir " test-resources/test_project" ]
61+ (sh {:dir dir :err :inherit }
62+ " npx cherry compile src/macro_data.cljc src/macro_data_macros.cljc macro_data_via_require_test.cljc" )
63+ (let [{:keys [out exit]} (sh {:dir dir :out :string :err :inherit }
64+ " node macro_data_via_require_test.mjs" )]
65+ (is (zero? exit) " consumer runs without ERR_MODULE_NOT_FOUND" )
66+ (is (str/includes? out " :fn-key :add" ) " add prints data-driven body" )
67+ (is (str/includes? out " :fn-key :mul" ) " mul prints data-driven body" ))))
68+
5969(defn run-tests []
6070 (shell {:dir " test-resources/test_project" } " npm install" )
6171 (let [{:keys [fail error]} (t/run-tests 'integration-tests)]
Original file line number Diff line number Diff line change 33 org.babashka/sci {:mvn/version " 0.10.49" }
44 io.github.squint-cljs/squint
55 #_{:local/root " /Users/borkdude/dev/squint" }
6- {:git/sha " 9ad6e7b6106c93fd58cd3c1358d5838cce85db28 " }}
6+ {:git/sha " e77924abcf30e96939c51432c91c5202bd0928a4 " }}
77 :aliases
88 {:cljs {:extra-paths [" test" ]
99 :extra-deps {thheller/shadow-cljs {:mvn/version " 3.3.4" }
You can’t perform that action at this time.
0 commit comments