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

Asserting error thrown no longer works as of 2.11.3 #141

Closed
jasonmit opened this issue Mar 9, 2017 · 3 comments
Closed

Asserting error thrown no longer works as of 2.11.3 #141

jasonmit opened this issue Mar 9, 2017 · 3 comments

Comments

@jasonmit
Copy link
Member

jasonmit commented Mar 9, 2017

Unsure where the proper fix belongs, but I believe it surfaced as part of:
emberjs/ember.js#14898

Example of test that now fails since the assertion is not handled by mocha/chai before the error is thrown:

it('x-foo throws on initialization if no model is provided', function() {
  expect(() => {
    this.render(hbs`{{x-foo}}`);
  }).to.throw('model attribute must be provided to x-foo');
});
@Turbo87
Copy link
Member

Turbo87 commented Mar 9, 2017

@workmanw @rwjblue any comments?

@Turbo87
Copy link
Member

Turbo87 commented Mar 10, 2017

okay, so I got several opinions on this:

  • expect().to.throw() is provided by Chai and https://github.com/ember-cli/ember-cli-chai, so if that was broken the issue should be fixed over there
  • expect().to.throw() is not broken since it works very well when you put e.g. throw new Error('foo') inside of it
  • if this.render() threw previously, but is not throwing anymore then that is an API change of Ember itself

Robdel12 added a commit to adopted-ember-addons/emberx-select that referenced this issue Mar 24, 2017
According to this
ticket (emberjs/ember.js#15013) and this
ticket (emberjs/ember-mocha#141) ember 2.11
broke testing exceptions.
Robdel12 added a commit to adopted-ember-addons/emberx-select that referenced this issue Mar 24, 2017
* Upgrade ember-cli 2.11.0

* Upgrade to ember-cli 2.12.1

* Update mocha tests

* ember#release seems to be borked.

* Skip test related to testing thrown errors

According to this
ticket (emberjs/ember.js#15013) and this
ticket (emberjs/ember-mocha#141) ember 2.11
broke testing exceptions.
bmeurant pushed a commit to bmeurant/ember-array-contains-helper that referenced this issue Apr 9, 2017
bmeurant pushed a commit to bmeurant/ember-array-contains-helper that referenced this issue Apr 9, 2017
bmeurant pushed a commit to bmeurant/ember-array-contains-helper that referenced this issue Apr 9, 2017
Asserting error thrown no longer works as of ember 2.11
see (emberjs/ember.js#15013) and (emberjs/ember-mocha#141)
bmeurant pushed a commit to bmeurant/ember-array-contains-helper that referenced this issue Apr 9, 2017
Asserting error thrown no longer works as of ember 2.11
see (emberjs/ember.js#15013) and (emberjs/ember-mocha#141)
@Turbo87
Copy link
Member

Turbo87 commented Apr 17, 2017

this seems to be an issue in Ember itself, so I'll close the issue here for now in favor of emberjs/ember.js#15013

@Turbo87 Turbo87 closed this as completed Apr 17, 2017
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

No branches or pull requests

2 participants