File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939 :else sd))
4040 :cljs (validate-statement-data*
4141 (cond
42- (string? sd) (.parse js/JSON sd)
42+ (string? sd) (js->clj ( .parse js/JSON sd) )
4343 :else sd))))
4444
4545#?(:cljs
Original file line number Diff line number Diff line change 7373 (testing " with string data"
7474 (let [statement (json/write-str long-statement)]
7575 (testing " it parses and returns the validated data"
76- (is (= long-statement (validate-statement-data statement)))))))
76+ (is (= long-statement (validate-statement-data statement))))))
77+ :cljs
78+ (testing " with string data"
79+ (let [json (clj->js long-statement)
80+ json-str (.stringify js/JSON json)]
81+ (testing " it parses and returns the validated data"
82+ (is (= long-statement (validate-statement-data json-str)))))))
7783
7884 #? (:cljs
7985 (testing " with nested data"
You can’t perform that action at this time.
0 commit comments