Skip to content

Commit df6663c

Browse files
committed
Fix tests
1 parent f6cd1ec commit df6663c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

test/index.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ test('Basics', () => {
2121
A.go('/a/b/c/d/e/f/g/', { replace: true })
2222
const b = A.get()
2323

24-
assert.deepEqual(a, { path: '/a/b/c/d/e/f/g', fullPath: '/a/b/c/d/e/f/g' })
24+
assert.deepEqual(a, { localPath: '/a/b/c/d/e/f/g', path: '/a/b/c/d/e/f/g' })
2525
assert.deepEqual(a, b, 'path normalization')
2626

2727
const B1 = A.child({ prefix: '/a/b' })
2828
const B2 = A.child({ prefix: '/a/b/' })
2929

30-
assert.deepEqual(B1.get(), { path: '/c/d/e/f/g', fullPath: '/a/b/c/d/e/f/g' })
30+
assert.deepEqual(B1.get(), { localPath: '/c/d/e/f/g', path: '/a/b/c/d/e/f/g' })
3131
assert.deepEqual(B1.get(), B2.get())
3232

3333
A.go('/a/c/d')
@@ -37,23 +37,23 @@ test('Basics', () => {
3737
`If child path isn't applicable, it has an undefined path`,
3838
)
3939

40-
assert.deepEqual(A.get(), { path: '/a/c/d', fullPath: '/a/c/d' })
40+
assert.deepEqual(A.get(), { localPath: '/a/c/d', path: '/a/c/d' })
4141
B1.go('/d')
4242
assert.deepEqual(
4343
A.get(),
44-
{ path: '/a/b/d', fullPath:'/a/b/d' },
44+
{ localPath: '/a/b/d', path:'/a/b/d' },
4545
'Writing to subroute reactivated its original prefix',
4646
)
4747

48-
assert.deepEqual(B1.get(), { path: '/d', fullPath:'/a/b/d' }, 'And path is no longer undefined')
48+
assert.deepEqual(B1.get(), { localPath: '/d', path:'/a/b/d' }, 'And path is no longer undefined')
4949
assert.deepEqual(B1.get(), B2.get(), 'B1 and B2 are in sync')
5050

5151
B2.go('/c')
5252

5353
const C1 = B1.child({ prefix: '/c' })
5454
const C2 = B2.child({ prefix: '/c' })
5555

56-
assert.deepEqual(C1.get(), { path: '/', fullPath:'/a/b/c' })
56+
assert.deepEqual(C1.get(), { localPath: '/', path:'/a/b/c' })
5757
})
5858

5959
test('Children of empty prefix', () => {
@@ -64,7 +64,7 @@ test('Children of empty prefix', () => {
6464
const B = A.child({ prefix: '/financials' })
6565
const C = B.child({ prefix: '/edit' })
6666

67-
assert.equal('/financials/edit/1', A.get().path)
68-
assert.equal(B.get().path, '/edit/1')
69-
assert.equal(C.get().path, '/1')
67+
assert.equal('/financials/edit/1', A.get().localPath)
68+
assert.equal(B.get().localPath, '/edit/1')
69+
assert.equal(C.get().localPath, '/1')
7070
})

0 commit comments

Comments
 (0)