This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-21
Channels
- # babashka (16)
- # beginners (182)
- # calva (13)
- # chlorine-clover (43)
- # clj-kondo (17)
- # cljs-dev (14)
- # cljsrn (19)
- # clojure (97)
- # clojure-argentina (7)
- # clojure-dev (45)
- # clojure-europe (7)
- # clojure-germany (5)
- # clojure-nl (4)
- # clojure-portugal (4)
- # clojure-romania (5)
- # clojure-spec (46)
- # clojure-uk (21)
- # clojuredesign-podcast (2)
- # clojurescript (159)
- # conjure (28)
- # core-async (7)
- # cursive (13)
- # datomic (17)
- # defnpodcast (9)
- # duct (1)
- # fulcro (45)
- # graphql (6)
- # jobs (7)
- # jobs-discuss (1)
- # juxt (3)
- # kaocha (4)
- # leiningen (12)
- # malli (5)
- # observability (1)
- # off-topic (50)
- # pathom (15)
- # re-frame (16)
- # reitit (5)
- # remote-jobs (21)
- # ring (7)
- # shadow-cljs (166)
- # test-check (6)
- # tools-deps (27)
- # xtdb (2)
I’m trying to implement my first deftype
for physical quantities like 1.0 m**2
(more or less a tuple) and I’m a bit confused about what kaocha’s using to convert it to strings for test reporting. In the initial deftype I’ve implemented toString
of Object
. It seems to be picking that up in clj but not in cljs:
FAIL in cljs:nzn.esc-targets-test/air-changes-above-6999-hdd-18 (cljs/test.js:424)
Expected:
#object[opengb.dram.core.Quantity]
Actual:
#object[opengb.dram.core.Quantity]
Diff:
- #object[opengb.dram.core.Quantity]
+ #object[opengb.dram.core.Quantity]
FAIL in nzn.esc-targets-test/air-changes-above-6999-hdd-18 (esc_targets_test.cljc:24)
Expected:
#<opengb.dram.core.Quantity@4198e66b <2.0 ACH>>
Actual:
-#<opengb.dram.core.Quantity@4198e66b <2.0 ACH>> +#<opengb.dram.core.Quantity@446582b1 <3.0 ACH>>
8 tests, 24 assertions, 2 failures.
I scanned through cljs core looking for other protocols (eg. I had to flip to IEquiv
for equality since equals
seems to also be clj only), but nothing hopped out at me.
I wouldn’t think print-method
or print-dup
would have much to do with cljs, but I’m always willing to be surprised, I guess.
hm, doesn’t seem to be IPrintWithWriter
either, per https://clojurians.slack.com/archives/C03S1L9DN/p1587494680270400?thread_ts=1587490666.267200&cid=C03S1L9DN