ember.js: Asserting error thrown no longer works as of 2.11

The following test, no longer run after we start to use 2.11.1.

test('it throws error my-custom-input is called', function(assert) {
    assert.throws(() => {
        this.render(hbs`{{my-custom-input}}`);
    }, /my-custom-input component error/, 'Error must have been thrown');
});

I saw mocha users had faced with nearly the same problems: https://github.com/emberjs/ember-mocha/issues/141

SO Question: http://stackoverflow.com/questions/42781085/ember-render-hbs-swallowing-thrown-error Slack Archive: https://embercommunity.slack.com/archives/-testing/p1489479464001332

Repro https://ember-twiddle.com/47c4cfbb571ac3fa83ab912f605ebc6a?fileTreeShown=false&openFiles=tests.integration.components.i-throw-test.js%2C

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 11
  • Comments: 15 (8 by maintainers)

Commits related to this issue

Most upvoted comments

This was fixed by https://github.com/emberjs/ember.js/pull/15871, which essentially reverts https://github.com/emberjs/ember.js/pull/14898 and adds a bunch of tests.

Just came across this same issue while attempting to update an addon from ember/cli 2.9. Has anyone found a decent workaround for ember-cli-chai usage?