chore(router): clang-format
This commit is contained in:
@ -96,7 +96,8 @@ export function main() {
|
||||
.toHaveText('team 22 { hello victor, aux: simple }');
|
||||
})));
|
||||
|
||||
it('should deactivate outlets', fakeAsync(inject([Router, TestComponentBuilder], (router, tcb) => {
|
||||
it('should deactivate outlets',
|
||||
fakeAsync(inject([Router, TestComponentBuilder], (router, tcb) => {
|
||||
let fixture = tcb.createFakeAsync(RootCmp);
|
||||
|
||||
router.navigateByUrl('/team/22/user/victor(/simple)');
|
||||
@ -227,11 +228,11 @@ export function main() {
|
||||
})));
|
||||
|
||||
it("should support top-level link",
|
||||
fakeAsync(inject([Router, TestComponentBuilder], (router, tcb) => {
|
||||
let fixture = tcb.createFakeAsync(LinkCmp);
|
||||
advance(fixture);
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('link');
|
||||
})));
|
||||
fakeAsync(inject([Router, TestComponentBuilder], (router, tcb) => {
|
||||
let fixture = tcb.createFakeAsync(LinkCmp);
|
||||
advance(fixture);
|
||||
expect(fixture.debugElement.nativeElement).toHaveText('link');
|
||||
})));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -183,9 +183,9 @@ export function main() {
|
||||
let p = parser.parse("/a(ap)/c(cp)");
|
||||
let c = p.firstChild(p.root);
|
||||
|
||||
let child = new RouteSegment([], {'one':'1'}, null, null, null);
|
||||
let child = new RouteSegment([], {'one': '1'}, null, null, null);
|
||||
let root = new TreeNode<RouteSegment>(new RouteSegment([c], {}, null, null, null),
|
||||
[new TreeNode<RouteSegment>(child, [])]);
|
||||
[new TreeNode<RouteSegment>(child, [])]);
|
||||
let tree = new RouteTree(root);
|
||||
|
||||
let t = link(child, tree, p, ["./c2"]);
|
||||
|
@ -22,7 +22,7 @@ import {DEFAULT_OUTLET_NAME} from '../src/constants';
|
||||
export function main() {
|
||||
describe('recognize', () => {
|
||||
let emptyRouteTree = createEmptyRouteTree(ComponentA);
|
||||
|
||||
|
||||
it('should handle position args',
|
||||
inject([AsyncTestCompleter, ComponentResolver], (async, resolver) => {
|
||||
recognize(resolver, ComponentA, tree("b/paramB/c/paramC/d"), emptyRouteTree)
|
||||
@ -191,17 +191,19 @@ export function main() {
|
||||
|
||||
it("should reuse existing segments",
|
||||
inject([AsyncTestCompleter, ComponentResolver], (async, resolver) => {
|
||||
recognize(resolver, ComponentA, tree("/b/1/d"), emptyRouteTree).then(t1 => {
|
||||
recognize(resolver, ComponentA, tree("/b/1/e"), t1).then(t2 => {
|
||||
expect(t1.root).toBe(t2.root);
|
||||
expect(t1.firstChild(t1.root)).toBe(t2.firstChild(t2.root));
|
||||
expect(t1.firstChild(t1.firstChild(t1.root))).not.toBe(
|
||||
t2.firstChild(t2.firstChild(t2.root)));
|
||||
recognize(resolver, ComponentA, tree("/b/1/d"), emptyRouteTree)
|
||||
.then(t1 => {
|
||||
recognize(resolver, ComponentA, tree("/b/1/e"), t1)
|
||||
.then(t2 => {
|
||||
expect(t1.root).toBe(t2.root);
|
||||
expect(t1.firstChild(t1.root)).toBe(t2.firstChild(t2.root));
|
||||
expect(t1.firstChild(t1.firstChild(t1.root)))
|
||||
.not.toBe(t2.firstChild(t2.firstChild(t2.root)));
|
||||
|
||||
async.done();
|
||||
});
|
||||
});
|
||||
}));
|
||||
async.done();
|
||||
});
|
||||
});
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user