Commit e4a5e36f authored by Bruno Burke's avatar Bruno Burke 🍔
Browse files

add shadow-cljs unit-testing on port 8021; use mathjs as import

parent 3c00cc34
Pipeline #116903 passed with stages
in 8 minutes and 19 seconds
{:dev-http
{3000 "resources/public"
8021 "out/test"
3004 ["resources/public/devcards" "resources/public"]} ; public included to serve static assets under the same path as 3000 /img/shadow.png
:source-paths ["src/cljs" "src/cljc" "src/devcards"]
:source-paths ["src/cljs" "src/cljc" "src/devcards" "test/cljc" "test/cljs"]
:repositories {"internal" {:url "https://maven.leukipp.de/releases"
:username "anonymous"}}
:dependencies
......@@ -34,4 +35,9 @@
{:target :browser
:output-dir "resources/public/js"
:compiler-options {:output-feature-set :es8}
:modules {:standalone-renderer {:entries [leukipp.components.standalone-renderer]}}}}}
:modules {:standalone-renderer {:entries [leukipp.components.standalone-renderer]}}}
:test
{:target :browser-test
:test-dir "out/test"
:compiler-options {:output-feature-set :es8}
:autorun true}}}
......@@ -20,7 +20,8 @@
[leukipp.components.exercise-types.multistep-calculation.migration :refer [migrate-answer migrate-backend]]
[leukipp.components.helper
:refer
[double-division math-abs]])))
[double-division math-abs]]
["mathjs" :as mathjs])))
(def prefix-mapping {"Y" 24
"Z" 21
......@@ -224,7 +225,7 @@
(trim-newline (:out shell-obj)))
:cljs
(try
(js/math.format (js/math.evaluate val)
(mathjs/format (mathjs/evaluate val)
#js {:notation notation
:precision (edn/read-string precision)})
(catch :default e (js/console.info e))))]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment