@@ -21,13 +21,13 @@ test('Basics', () => {
21
21
A . go ( '/a/b/c/d/e/f/g/' , { replace : true } )
22
22
const b = A . get ( )
23
23
24
- assert . deepEqual ( a , { path : '/a/b/c/d/e/f/g' } )
24
+ assert . deepEqual ( a , { path : '/a/b/c/d/e/f/g' , fullPath : '/a/b/c/d/e/f/g' } )
25
25
assert . deepEqual ( a , b , 'path normalization' )
26
26
27
27
const B1 = A . child ( { prefix : '/a/b' } )
28
28
const B2 = A . child ( { prefix : '/a/b/' } )
29
29
30
- assert . deepEqual ( B1 . get ( ) , { path : '/c/d/e/f/g' } )
30
+ assert . deepEqual ( B1 . get ( ) , { path : '/c/d/e/f/g' , fullPath : '/a/b/c/d/e/f/g' } )
31
31
assert . deepEqual ( B1 . get ( ) , B2 . get ( ) )
32
32
33
33
A . go ( '/a/c/d' )
@@ -37,23 +37,23 @@ test('Basics', () => {
37
37
`If child path isn't applicable, it has an undefined path` ,
38
38
)
39
39
40
- assert . deepEqual ( A . get ( ) , { path : '/a/c/d' } )
40
+ assert . deepEqual ( A . get ( ) , { path : '/a/c/d' , fullPath : '/a/c/d' } )
41
41
B1 . go ( '/d' )
42
42
assert . deepEqual (
43
43
A . get ( ) ,
44
- { path : '/a/b/d' } ,
44
+ { path : '/a/b/d' , fullPath : '/a/b/d' } ,
45
45
'Writing to subroute reactivated its original prefix' ,
46
46
)
47
47
48
- assert . deepEqual ( B1 . get ( ) , { path : '/d' } , 'And path is no longer undefined' )
48
+ assert . deepEqual ( B1 . get ( ) , { path : '/d' , fullPath : '/a/b/d' } , 'And path is no longer undefined' )
49
49
assert . deepEqual ( B1 . get ( ) , B2 . get ( ) , 'B1 and B2 are in sync' )
50
50
51
51
B2 . go ( '/c' )
52
52
53
53
const C1 = B1 . child ( { prefix : '/c' } )
54
54
const C2 = B2 . child ( { prefix : '/c' } )
55
55
56
- assert . deepEqual ( C1 . get ( ) , { path : '/' } )
56
+ assert . deepEqual ( C1 . get ( ) , { path : '/' , fullPath : '/a/b/c' } )
57
57
} )
58
58
59
59
test ( 'Children of empty prefix' , ( ) => {
0 commit comments