@ -100,7 +100,7 @@ export function main() {
|
||||
expect(log).toEqual(['activate: null -> /on-activate']);
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
}), 2000);
|
||||
|
||||
it('should wait for a parent component\'s onActivate hook to resolve before calling its child\'s',
|
||||
inject([AsyncTestCompleter], (async) => {
|
||||
@ -123,7 +123,7 @@ export function main() {
|
||||
async.done();
|
||||
});
|
||||
});
|
||||
}));
|
||||
}), 2000);
|
||||
|
||||
it('should call the onDeactivate hook', inject([AsyncTestCompleter], (async) => {
|
||||
compile()
|
||||
@ -136,7 +136,7 @@ export function main() {
|
||||
expect(log).toEqual(['deactivate: /on-deactivate -> /a']);
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
}), 2000);
|
||||
|
||||
it('should wait for a child component\'s onDeactivate hook to resolve before calling its parent\'s',
|
||||
inject([AsyncTestCompleter], (async) => {
|
||||
@ -161,7 +161,7 @@ export function main() {
|
||||
async.done();
|
||||
});
|
||||
});
|
||||
}));
|
||||
}), 2000);
|
||||
|
||||
it('should reuse a component when the canReuse hook returns true',
|
||||
inject([AsyncTestCompleter], (async) => {
|
||||
@ -182,7 +182,7 @@ export function main() {
|
||||
expect(cmpInstanceCount).toBe(1);
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
}), 2000);
|
||||
|
||||
|
||||
it('should not reuse a component when the canReuse hook returns false',
|
||||
@ -204,7 +204,7 @@ export function main() {
|
||||
expect(cmpInstanceCount).toBe(2);
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
}), 2000);
|
||||
|
||||
|
||||
it('should navigate when canActivate returns true', inject([AsyncTestCompleter], (async) => {
|
||||
@ -224,7 +224,7 @@ export function main() {
|
||||
async.done();
|
||||
});
|
||||
});
|
||||
}));
|
||||
}), 2000);
|
||||
|
||||
it('should not navigate when canActivate returns false',
|
||||
inject([AsyncTestCompleter], (async) => {
|
||||
@ -244,7 +244,7 @@ export function main() {
|
||||
async.done();
|
||||
});
|
||||
});
|
||||
}));
|
||||
}), 2000);
|
||||
|
||||
it('should navigate away when canDeactivate returns true',
|
||||
inject([AsyncTestCompleter], (async) => {
|
||||
@ -269,7 +269,7 @@ export function main() {
|
||||
async.done();
|
||||
});
|
||||
});
|
||||
}));
|
||||
}), 2000);
|
||||
|
||||
it('should not navigate away when canDeactivate returns false',
|
||||
inject([AsyncTestCompleter], (async) => {
|
||||
@ -294,7 +294,7 @@ export function main() {
|
||||
async.done();
|
||||
});
|
||||
});
|
||||
}));
|
||||
}), 2000);
|
||||
|
||||
|
||||
it('should run activation and deactivation hooks in the correct order',
|
||||
@ -322,7 +322,7 @@ export function main() {
|
||||
]);
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
}), 2000);
|
||||
|
||||
it('should only run reuse hooks when reusing', inject([AsyncTestCompleter], (async) => {
|
||||
compile()
|
||||
@ -349,7 +349,7 @@ export function main() {
|
||||
]);
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
}), 2000);
|
||||
|
||||
it('should not run reuse hooks when not reusing', inject([AsyncTestCompleter], (async) => {
|
||||
compile()
|
||||
@ -378,7 +378,7 @@ export function main() {
|
||||
]);
|
||||
async.done();
|
||||
});
|
||||
}));
|
||||
}), 2000);
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user