Skip to content
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

Do not register a router service for Ember <1.13 #100

Merged
merged 1 commit into from
Sep 13, 2015

Conversation

mixonic
Copy link
Sponsor Member

@mixonic mixonic commented Sep 9, 2015

Versions of Ember prior to 1.13 require a full router booted by the app, or no router at all. This ensures they receive no router at all instead of the 1.13-safe one. Result is that the link-to helper can be used in Ember 1.11 and 1.12 component tests (unit and integration).

See also these PRs that attempted to fix the issue in Ember:

IMO, it is more appropriate that it be fixed here, since ember-test-helpers is basically dealing with fragile/intimate API surface when it sets up a router in the container.

@@ -4,6 +4,13 @@ import { Klass } from 'klassy';
import { getResolver } from './test-resolver';
import buildRegistry from './build-registry';

function hasEmberVersion(major, minor) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move this to its own file? We have a scenario in tests (for closure actions) where we are using a regexp to determine if a given test should run, and this is a much cleaner solution.

Something like /lib/ember-test-helpers/has-ember-version.js?

@rwjblue
Copy link
Member

rwjblue commented Sep 9, 2015

Can you confirm that the test added here failed prior to the changes?

@rwjblue
Copy link
Member

rwjblue commented Sep 9, 2015

BTW - The failure in Travis is for canary builds and is being tracked in #99.

@mixonic
Copy link
Sponsor Member Author

mixonic commented Sep 10, 2015

Confirmed that the only failure here is the one in #99

screenshot

Versions of Ember prior to 1.13 require a full router booted by the app,
or no router at all. This ensures they receive no router at all instead
of the 1.13-safe one.
rwjblue added a commit that referenced this pull request Sep 13, 2015
Do not register a router service for Ember <1.13
@rwjblue rwjblue merged commit cdb5ad2 into emberjs:master Sep 13, 2015
@rwjblue
Copy link
Member

rwjblue commented Sep 13, 2015

Thank you!

blimmer added a commit to blimmer/ember-cli-example-app-for-github that referenced this pull request Sep 17, 2015
Supposedly fixed with emberjs/ember-test-helpers#100 , but still seeing the same problem.
@mixonic mixonic deleted the no-router-for-old-men branch November 21, 2018 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants