Skip to content

Commit

Permalink
Merge pull request #900 from emberjs/fix-ember-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue authored Oct 6, 2021
2 parents 1b111b4 + ebaef4c commit df4aebd
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions addon-test-support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ if (typeof Testem !== 'undefined') {
Testem.hookIntoTestFramework();
}

import { run } from '@ember/runloop';
import { assign } from '@ember/polyfills';
import { _backburner } from '@ember/runloop';
import { resetOnerror, getTestMetadata } from '@ember/test-helpers';
import { loadTests } from './test-loader';
import Ember from 'ember';
Expand All @@ -28,10 +27,7 @@ import { installTestNotIsolatedHook } from './test-isolation-validation';
let waitForSettled = true;

export function setupTest(hooks, _options) {
let options =
_options === undefined
? { waitForSettled }
: assign({ waitForSettled }, _options);
let options = { waitForSettled, ..._options };

hooks.beforeEach(function (assert) {
let testMetadata = getTestMetadata(this);
Expand All @@ -58,10 +54,7 @@ export function setupTest(hooks, _options) {
}

export function setupRenderingTest(hooks, _options) {
let options =
_options === undefined
? { waitForSettled }
: assign({ waitForSettled }, _options);
let options = { waitForSettled, ..._options };

setupTest(hooks, options);

Expand All @@ -71,10 +64,7 @@ export function setupRenderingTest(hooks, _options) {
}

export function setupApplicationTest(hooks, _options) {
let options =
_options === undefined
? { waitForSettled }
: assign({ waitForSettled }, _options);
let options = { waitForSettled, ..._options };

setupTest(hooks, options);

Expand Down Expand Up @@ -164,7 +154,7 @@ export function setupResetOnerror() {

export function setupTestIsolationValidation(delay) {
waitForSettled = false;
run.backburner.DEBUG = true;
_backburner.DEBUG = true;
QUnit.on('testStart', () => installTestNotIsolatedHook(delay));
}

Expand Down

0 comments on commit df4aebd

Please sign in to comment.