Skip to content

Commit 0a7b50a

Browse files
committed
Test fix, silence extra cljs warnings
1 parent bf82533 commit 0a7b50a

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

shadow-cljs.edn

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,19 @@
88
:output-to "target/shadow-node-test/node-tests.js"
99
:ns-regexp "-test"
1010
;; Watch will also run the tests
11-
:autorun true}
11+
:autorun true
12+
:compiler-options {:warnings {:redef-in-file false
13+
:fn-deprecated false}}}
1214

1315
:browser-test
1416
{:target :browser-test
15-
:test-dir "target/shadow-browser-test"}
17+
:test-dir "target/shadow-browser-test"
18+
:compiler-options {:warnings {:redef-in-file false
19+
:fn-deprecated false}}}
1620

1721
:karma
1822
{:target :karma
1923
:output-to "target/karma/ci.js"
20-
:ns-regexp "-test$"}}}
24+
:ns-regexp "-test$"
25+
:compiler-options {:warnings {:redef-in-file false
26+
:fn-deprecated false}}}}}

test/cljs/reitit/frontend/history_test.cljs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,23 @@
4949
(fn [match history]
5050
(let [url (rfh/-get-path history)]
5151
(case (swap! n inc)
52-
1 (do (is (= "/" url)
52+
1 (rfh/push-state history ::frontpage)
53+
2 (do (is (= "/" url)
5354
"start at root")
5455
(rfh/push-state history ::foo))
55-
2 (do (is (= "/foo" url)
56+
3 (do (is (= "/foo" url)
5657
"push-state")
5758
(.back js/window.history))
58-
3 (do (is (= "/" url)
59+
4 (do (is (= "/" url)
5960
"go back")
6061
(rfh/push-state history ::bar {:id 1}))
61-
4 (do (is (= "/bar/1" url)
62+
5 (do (is (= "/bar/1" url)
6263
"push-state 2")
6364
(rfh/replace-state history ::bar {:id 2}))
64-
5 (do (is (= "/bar/2" url)
65+
6 (do (is (= "/bar/2" url)
6566
"replace-state")
6667
(.back js/window.history))
67-
6 (do (is (= "/" url)
68+
7 (do (is (= "/" url)
6869
"go back after replace state")
6970
(rfh/stop! history)
7071
(done))

0 commit comments

Comments
 (0)