I have a simple component integration test:
test('it throws error my-custom-input is called', function(assert) {
assert.throws(() => {
this.render(hbs``);
}, /my-custom-input component error/, 'Error must have been thrown');
});
Source code of component.js is like:
export default Ember.Component.extend({
layout,
init() {
this._super(...arguments);
throw 'my-custom-input component error';
}
}
While my ember-cli version was 2.3.0, the test was passing. However, after I've updated my ember-cli version to 2.11.1, the test did not pass. The error was:
actual: >
false
expected: >
true
Why does ember render start to swallow the thrown exception?
Aucun commentaire:
Enregistrer un commentaire