feature(router): add route.root returning the root of router state

This commit is contained in:
vsavkin
2016-08-07 20:09:04 -07:00
committed by Alex Rickabaugh
parent 5a99393355
commit 1a41bd1ca4
2 changed files with 14 additions and 0 deletions

View File

@ -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);
});