@@ -5,13 +5,15 @@ if (!isIE9) {
5
5
6
6
var url = location . href
7
7
var pathname = location . pathname
8
+ var history
8
9
afterEach ( function ( done ) {
9
- history . replaceState ( { } , '' , url )
10
+ history . stop ( )
11
+ window . history . replaceState ( { } , '' , url )
10
12
setTimeout ( done , 0 )
11
13
} )
12
14
13
15
it ( 'notify change' , function ( done ) {
14
- var history = new History ( {
16
+ history = new History ( {
15
17
onChange : step1
16
18
} )
17
19
history . start ( )
@@ -39,7 +41,7 @@ if (!isIE9) {
39
41
} )
40
42
41
43
it ( 'root option' , function ( done ) {
42
- var history = new History ( {
44
+ history = new History ( {
43
45
onChange : step1 ,
44
46
root : 'root/'
45
47
} )
@@ -56,8 +58,8 @@ if (!isIE9) {
56
58
}
57
59
} )
58
60
59
- it ( 'popstate with root' , function ( ) {
60
- var history = new History ( {
61
+ it ( 'popstate with root' , function ( done ) {
62
+ history = new History ( {
61
63
onChange : step1 ,
62
64
root : 'root/'
63
65
} )
@@ -90,7 +92,7 @@ if (!isIE9) {
90
92
var base = document . createElement ( 'base' )
91
93
base . setAttribute ( 'href' , '/base/' )
92
94
document . head . appendChild ( base )
93
- var history = new History ( {
95
+ history = new History ( {
94
96
onChange : step1
95
97
} )
96
98
history . start ( )
0 commit comments