I'm using Ember.Logger.error:
if (isInvalid) {
Ember.Logger.error('this is invalid');
}
I want to test it in qunit:
assert.throws(() => myFunction(), /this is invalid/, 'error was thrown');
But assert.throws doesn't catch the error. It does if I replace Ember.Logger.error with a simple throw statement, but surely there's a way to test for logged Ember errors. Anyone know the way?
Aucun commentaire:
Enregistrer un commentaire