This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-03-05
Channels
- # aleph (90)
- # announcements (4)
- # aws (2)
- # beginners (61)
- # calva (2)
- # cljs-dev (8)
- # cljsrn (12)
- # clojars (4)
- # clojure (42)
- # clojure-europe (1)
- # clojure-finland (1)
- # clojure-greece (2)
- # clojure-houston (1)
- # clojure-italy (3)
- # clojure-nl (30)
- # clojure-spec (41)
- # clojure-uk (87)
- # clojurescript (44)
- # cursive (12)
- # data-science (11)
- # datomic (24)
- # defnpodcast (1)
- # fulcro (18)
- # hyperfiddle (1)
- # jobs (2)
- # juxt (11)
- # kaocha (3)
- # london-clojurians (5)
- # mount (2)
- # nrepl (2)
- # off-topic (9)
- # onyx (25)
- # other-languages (1)
- # parinfer (3)
- # pathom (5)
- # pedestal (3)
- # portkey (1)
- # re-frame (21)
- # reagent (24)
- # remote-jobs (7)
- # schema (2)
- # shadow-cljs (59)
- # spacemacs (5)
- # specter (7)
- # sql (9)
- # tools-deps (13)
related to that macro self-refer topic:
this was the first time I had to explicitly :include-macros
when requiring clojure.test. Other projects “just worked” without doing this.
https://github.com/borkdude/finitize/blob/master/test/finitize/core_test.cljc#L4
e.g. here I didn’t have to do this: https://github.com/borkdude/re-find/blob/master/test/re_find/core_test.cljc#L3
The guide does tell to require it like:
(:require [cljs.test :refer-macros [deftest is testing run-tests]])
but I wonder why I never ran into this before@borkdude I can't repro any failure. If I remove the explicit :include-macros
, and I run the tests in a REPL, I get
Ran 1 tests containing 6 assertions.
weird. I got:
$ clj -A:test:cljs-test-runner
Testing finitize.core-test
ERROR in (finitize-test) (TypeError:NaN:NaN)
default
expected: (= 1 (finitize 1))
actual: #object[TypeError TypeError: Cannot read property 'finitize' of undefined]
ERROR in (finitize-test) (TypeError:NaN:NaN)
default
expected: (= 1 (finitize 1 100))
actual: #object[TypeError TypeError: Cannot read property 'finitize' of undefined]