New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tests): add ROUTER_FAKE_PROVIDERS to angular2/alt_router/router_… #8345

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
5 participants
@vikerman
Contributor

vikerman commented Apr 29, 2016

This change adds providers for fake router dependencies.
This allows TestComponentBuilder to create components with RouterLink and RouterOutlet directives
without the test writer needing to override them.

@googlebot

This comment has been minimized.

googlebot commented Apr 29, 2016

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

@juliemr

This comment has been minimized.

Member

juliemr commented Apr 29, 2016

I verify that this is ok, CLA bot.

useFactory: routerFactory,
deps: CONST_EXPR([ComponentResolver, RouterUrlSerializer, RouterOutletMap, Location])
}))
]);

This comment has been minimized.

@mhevery

mhevery Apr 29, 2016

Member

Please rebase on top of #8324 as his PR will go in first and will break you. This should be:

export const ROUTER_FAKE_PROVIDERS: any[] = /*@ts2dart_const*/[
  RouterOutletMap,
  /*@ts2dart_Provider*/{provide: Location, useClass: SpyLocation},
  /*@ts2dart_Provider*/{provide: RouterUrlSerializer, {useClass: DefaultRouterUrlSerializer},
  /*@ts2dart_Provider*/{provide: Router, useFactory: routerFactory,
        deps: [ComponentResolver, RouterUrlSerializer, RouterOutletMap, Location] }
];
feat(tests): add ROUTER_FAKE_PROVIDERS to angular2/alt_router/router_…
…testing_providers

This change adds providers for fake router dependecies.
This allows TestComponentBuilder to create components with RouterLink and RouterOutlet directives
without the test writer needing to override them.
@mprobst

This comment has been minimized.

Contributor

mprobst commented Apr 30, 2016

Committed as 0f1b370.

@mprobst mprobst closed this Apr 30, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment