refactor(router): fix tests structure
This commit is contained in:
parent
93d48f1d89
commit
7c2f795ea6
|
@ -1660,7 +1660,6 @@ describe('Integration', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('CanDeactivate', () => {
|
describe('CanDeactivate', () => {
|
||||||
describe('should not deactivate a route when CanDeactivate returns false', () => {
|
|
||||||
let log: any;
|
let log: any;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -1709,6 +1708,7 @@ describe('Integration', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('should not deactivate a route when CanDeactivate returns false', () => {
|
||||||
it('works', fakeAsync(inject([Router, Location], (router: Router, location: Location) => {
|
it('works', fakeAsync(inject([Router, Location], (router: Router, location: Location) => {
|
||||||
const fixture = createRoot(router, RootCmp);
|
const fixture = createRoot(router, RootCmp);
|
||||||
|
|
||||||
|
@ -1829,6 +1829,7 @@ describe('Integration', () => {
|
||||||
advance(fixture);
|
advance(fixture);
|
||||||
expect(location.path()).toEqual('/team/33/user/fedor');
|
expect(location.path()).toEqual('/team/33/user/fedor');
|
||||||
})));
|
})));
|
||||||
|
});
|
||||||
|
|
||||||
it('should not create a route state if navigation is canceled',
|
it('should not create a route state if navigation is canceled',
|
||||||
fakeAsync(inject([Router, Location], (router: Router, location: Location) => {
|
fakeAsync(inject([Router, Location], (router: Router, location: Location) => {
|
||||||
|
@ -1998,7 +1999,6 @@ describe('Integration', () => {
|
||||||
})));
|
})));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
describe('CanActivateChild', () => {
|
describe('CanActivateChild', () => {
|
||||||
describe('should be invoked when activating a child', () => {
|
describe('should be invoked when activating a child', () => {
|
||||||
|
|
Loading…
Reference in New Issue