How to use the ember-qunit.QUnitAdapter.reopen function in ember-qunit

To help you get started, we’ve selected a few ember-qunit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github machty / ember-concurrency / tests / test-helper.js View on Github external
import Application from '../app';
import config from '../config/environment';
import { setApplication } from '@ember/test-helpers';
import { QUnitAdapter, start } from 'ember-qunit';
import QUnit from 'qunit';

QUnit.config.testTimeout = 5000;

function noop() {}

QUnitAdapter.reopen({
  exception(e) {
    // our tests depend on Ember.run bubbling errors thrown within the run loop.
    throw e;
  },

  asyncStart: function asyncStart() {
    if (this.qunit.config.current._isTaskTest) {
      this.doneCallbacks.push({ test: this.qunit.config.current, done: noop });
    } else {
      this._super();
    }
  },
});

setApplication(Application.create(config.APP));