Skip to content

fix(common/testing): remove internal MockLocationStrategy from common… - #9562

Merged
juliemr merged 1 commit into
angular:masterfrom
juliemr:api-review-common
Jun 24, 2016
Merged

juliemr merged 1 commit into
angular:masterfrom
juliemr:api-review-common

Conversation

@juliemr

@juliemr juliemr commented Jun 24, 2016

Copy link
Copy Markdown
Contributor

BREAKING CHANGE:

MockLocationStrategy was intended to be internal only and is now removed
from the @angular/common/testing public api

@juliemr juliemr added area: testing Issues related to Angular testing features, such as TestBed action: review labels Jun 24, 2016
@juliemr juliemr added this to the 2.0.0-rc.4 milestone Jun 24, 2016
@juliemr

juliemr commented Jun 24, 2016

Copy link
Copy Markdown
Contributor Author

cc @vsavkin this is the change we discussed the common/testing API. Does it look ok?

@juliemr
juliemr force-pushed the api-review-common branch from 0b827a3 to 9c1557d Compare June 24, 2016 06:31
@juliemr juliemr added action: review The PR is still awaiting reviews from at least one requested reviewer and removed action: review labels Jun 24, 2016
@IgorMinar

Copy link
Copy Markdown
Contributor

is this removed because people should be using mock location rather than mock location strategy? can you please clarify the commit message?

…/testing

BREAKING CHANGE:

MockLocationStrategy was intended to be internal only and is now removed
from the `@angular/common/testing` public api.

Use `SpyLocation` from `@angular/common/testing` for location testing.
@juliemr
juliemr force-pushed the api-review-common branch from 9c1557d to 1b33e2a Compare June 24, 2016 19:17
@juliemr

juliemr commented Jun 24, 2016

Copy link
Copy Markdown
Contributor Author

Updated commit message to reflect that users should use SpyLocation if necessary.

@IgorMinar IgorMinar added pr_state: LGTM action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jun 24, 2016
@juliemr
juliemr merged commit dcf7512 into angular:master Jun 24, 2016
akirasosa added a commit to springboot-angular2-tutorial/angular2-app that referenced this pull request Jul 14, 2016
I can not figure out how to use SpyLocation. Though MockLocationStrategy
became internal at angular/angular#9562 ,
SpyLocation still needs LocationStrategy as a constructor parameter.

And also, the location strategy provided to SpyLocation is not used at
all...
https://github.com/angular/angular/blob/master/modules/%40angular/common/testing/location_mock.ts#L33

And also, SpyLocation implements Location, but Location is not an
interface...
https://github.com/angular/angular/blob/master/modules/%40angular/common/testing/location_mock.ts#L22
ruchirsachdeva added a commit to ruchirsachdeva/angular-web-client that referenced this pull request Feb 19, 2017
I can not figure out how to use SpyLocation. Though MockLocationStrategy
became internal at angular/angular#9562 ,
SpyLocation still needs LocationStrategy as a constructor parameter.

And also, the location strategy provided to SpyLocation is not used at
all...
https://github.com/angular/angular/blob/master/modules/%40angular/common/testing/location_mock.ts#L33

And also, SpyLocation implements Location, but Location is not an
interface...
https://github.com/angular/angular/blob/master/modules/%40angular/common/testing/location_mock.ts#L22
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: testing Issues related to Angular testing features, such as TestBed cla: yes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants