feature(router): add route.root returning the root of router state
This commit is contained in:
@ -35,6 +35,11 @@ describe('RouterState & Snapshot', () => {
|
||||
});
|
||||
|
||||
it('should return root', () => {
|
||||
const b = state.root.firstChild;
|
||||
expect(b.root).toBe(state.root);
|
||||
});
|
||||
|
||||
it('should return parent', () => {
|
||||
const b = state.root.firstChild;
|
||||
expect(b.parent).toBe(state.root);
|
||||
});
|
||||
@ -72,6 +77,11 @@ describe('RouterState & Snapshot', () => {
|
||||
});
|
||||
|
||||
it('should return root', () => {
|
||||
const b = state.root.firstChild;
|
||||
expect(b.root).toBe(state.root);
|
||||
});
|
||||
|
||||
it('should return parent', () => {
|
||||
const b = state.root.firstChild;
|
||||
expect(b.parent).toBe(state.root);
|
||||
});
|
||||
|
Reference in New Issue
Block a user