Skip to content

Commit fb4a5e1

Browse files
committed
comment out compile time errors for now, need to move these into build time tests
1 parent 3c10854 commit fb4a5e1

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/test/cljs/cljs/destructuring_test.cljs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@
255255
(is (= 1 (let [{:foo/keys! [aa & :bb]} sample-map2] aa)))
256256
(is (= aa 1))
257257
(is (= 1 (let [{:keys! [::a & ::b]} {::a 1 , ::b 2}] a)))))
258-
(testing "that right of & is unbound (compile-time errors)"
258+
#_(testing "that right of & is unbound (compile-time errors)"
259259
(is (thrown? js/Error (eval '(let [{:keys! [a & :b]} sample-map] b))))
260260
(is (thrown? js/Error (eval '(let [{a :a {aa :a :as m :keys [b c & :e]} :b} sample-map] e))))
261261
(is (thrown? js/Error (eval '(let [{:keys! [foo/a & :foo/c]} sample-map] c))))
@@ -292,7 +292,7 @@
292292
(is (thrown? js/Error (let [{:syms! [b & 'foo/c]} (dissoc sample-map 'foo/c)] b)))
293293
(is (= aa 1))
294294
(is (= 1 (let [{:foo/syms! [aa & 'bb]} sample-map2] aa)))))
295-
(testing "that right of & is unbound (compile-time errors)"
295+
#_(testing "that right of & is unbound (compile-time errors)"
296296
(is (thrown? js/Error (eval '(let [{:syms! [a & 'b]} sample-map] b))))
297297
(is (thrown? js/Error (eval '(let [{a a {aa a :as m :syms [b c & 'e]} :b} sample-map] e))))
298298
(is (thrown? js/Error (eval '(let [{:syms! [foo/a & 'foo/c]} sample-map] c))))
@@ -317,7 +317,7 @@
317317
(is (= c 4))
318318
(is (thrown? js/Error (let [{a "a" {aa "a" :as m :strs! [b c & "d" "e"]} "b"} sample-map] a)))
319319
(is (thrown? js/Error (let [{a "a" {aa "a" :as m :strs! [b c & "d"]} "b"} (update sample-map "b" dissoc "c")] a)))))
320-
(testing "that right of & is unbound (compile-time errors)"
320+
#_(testing "that right of & is unbound (compile-time errors)"
321321
(is (thrown? js/Error (eval '(let [{:strs! [a & "b"]} sample-map] b))))
322322
(is (thrown? js/Error (eval '(let [{a "a" {aa "a" :as m :keys [b c & "e"]} "b"} sample-map] e)))))))
323323

@@ -397,7 +397,7 @@
397397
(testing "happy path"
398398
(testing ":defaults"
399399
(is (empty? (let [{:defaults d :or {}} {}] d)))
400-
(is (thrown? js/Error (eval '(let [{:defaults d :or {:a 1}} {}] d))))
400+
#_(is (thrown? js/Error (eval '(let [{:defaults d :or {:a 1}} {}] d))))
401401
(is (= {:a 1} (let [{:keys [a] :defaults d :or {:a 1}} {}] d)))
402402
(is (= {:a 1} (let [{:keys [a] :defaults d :or {a 1}} {}] d)))
403403
(is (= {:a 1, 'b 2, "c" 3} (let [{b 'b, c "c", :keys [a] :defaults d :or {:a 1, 'b 2, "c" 3}} {}] d))))
@@ -439,7 +439,7 @@
439439
(is (= 1 (let [{:keys [a & 'b]} {:a 1}] a)))
440440
(is (= 1 (let [{:keys! [a & 'b "c"]} {:a 1, 'b 2, "c" 3}] a))))
441441

442-
(testing "known compile-time errors"
442+
#_(testing "known compile-time errors"
443443
(is (thrown? js/Error (eval '(let [{:keys [a] :defaults d :or {:a 1, a 1}} {}] d))))
444444
(is (thrown? js/Error (eval '(let [{:defaults d} {}] d))))))))
445445

0 commit comments

Comments
 (0)