Skip to content

Instantly share code, notes, and snippets.

@rgm
Created January 14, 2022 05:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rgm/0af06f2c35aced5079b66a79081993d2 to your computer and use it in GitHub Desktop.
Save rgm/0af06f2c35aced5079b66a79081993d2 to your computer and use it in GitHub Desktop.
(ns reframe-stubs
"Define some browser globals so that re-frame namespaces don't blow up when
required in a node test run.")
(defn global-stubs! []
(js/console.log "STUBBING!")
(set! (.-window js/global) #js {}))
(global-stubs!)
#kaocha/v1
{:tests [{:id :cljs/unit-nodejs
:type :kaocha.type/cljs
:source-paths ["src/clj"]
:test-paths ["test/clj"]
:cljs/repl-env cljs.repl.node/repl-env
:cljs/compiler-options {:preloads [reframe-stubs]}
:cljs/timeout 20000}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment