File tree Expand file tree Collapse file tree 2 files changed +16
-9
lines changed
test/cljs/reitit/frontend Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 8
8
:output-to " target/shadow-node-test/node-tests.js"
9
9
:ns-regexp " -test"
10
10
; ; Watch will also run the tests
11
- :autorun true }
11
+ :autorun true
12
+ :compiler-options {:warnings {:redef-in-file false
13
+ :fn-deprecated false }}}
12
14
13
15
:browser-test
14
16
{: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 }}}
16
20
17
21
:karma
18
22
{:target :karma
19
23
: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 }}}}}
Original file line number Diff line number Diff line change 49
49
(fn [match history]
50
50
(let [url (rfh/-get-path history)]
51
51
(case (swap! n inc)
52
- 1 (do (is (= " /" url)
52
+ 1 (rfh/push-state history ::frontpage )
53
+ 2 (do (is (= " /" url)
53
54
" start at root" )
54
55
(rfh/push-state history ::foo ))
55
- 2 (do (is (= " /foo" url)
56
+ 3 (do (is (= " /foo" url)
56
57
" push-state" )
57
58
(.back js/window.history))
58
- 3 (do (is (= " /" url)
59
+ 4 (do (is (= " /" url)
59
60
" go back" )
60
61
(rfh/push-state history ::bar {:id 1 }))
61
- 4 (do (is (= " /bar/1" url)
62
+ 5 (do (is (= " /bar/1" url)
62
63
" push-state 2" )
63
64
(rfh/replace-state history ::bar {:id 2 }))
64
- 5 (do (is (= " /bar/2" url)
65
+ 6 (do (is (= " /bar/2" url)
65
66
" replace-state" )
66
67
(.back js/window.history))
67
- 6 (do (is (= " /" url)
68
+ 7 (do (is (= " /" url)
68
69
" go back after replace state" )
69
70
(rfh/stop! history)
70
71
(done ))
You can’t perform that action at this time.
0 commit comments