d509588cd2
Ember update - update ember-cli, ember-data, and ember to 3.4 series
16 lines
311 B
JavaScript
16 lines
311 B
JavaScript
import { waitUntil } from '@ember/test-helpers';
|
|
import Ember from 'ember';
|
|
|
|
export default function waitForError(opts) {
|
|
const orig = Ember.onerror;
|
|
|
|
let error = null;
|
|
Ember.onerror = err => {
|
|
error = err;
|
|
};
|
|
|
|
return waitUntil(() => error, opts).finally(() => {
|
|
Ember.onerror = orig;
|
|
});
|
|
}
|