Skip to content

Commit

Permalink
separate onerror validation too
Browse files Browse the repository at this point in the history
  • Loading branch information
ef4 committed Dec 17, 2024
1 parent d716b61 commit 634761b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
6 changes: 0 additions & 6 deletions addon/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,6 @@ export function setupTestIsolationValidation(delay) {
@param {Boolean} [options.setupEmberTesting] `false` opts out of the
default behavior of setting `Ember.testing` to `true` before all tests and
back to `false` after each test will.
@param {Boolean} [options.setupEmberOnerrorValidation] If `false` validation
of `Ember.onerror` will be disabled.
@param {Boolean} [options.setupTestIsolationValidation] If `false` test isolation validation
will be disabled.
@param {Number} [options.testIsolationValidationDelay] When using
Expand All @@ -209,10 +207,6 @@ export function start(options = {}) {
setupEmberTesting();
}

if (options.setupEmberOnerrorValidation !== false) {
setupEmberOnerrorValidation();
}

if (
typeof options.setupTestIsolationValidation !== 'undefined' &&
options.setupTestIsolationValidation !== false
Expand Down
3 changes: 2 additions & 1 deletion test-app/tests/test-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import * as QUnit from 'qunit';
import { setApplication } from '@ember/test-helpers';
import { setup } from 'qunit-dom';
import { loadTests } from 'ember-qunit/test-loader';
import { start } from 'ember-qunit';
import { start, setupEmberOnerrorValidation } from 'ember-qunit';

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

setup(QUnit.assert);

setupEmberOnerrorValidation();
loadTests();
start();
7 changes: 2 additions & 5 deletions test-app/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ export class QUnitAdapter extends EmberTestAdapter {}

export { module, test, skip, only, todo } from 'qunit';

export function setupEmberOnerrorValidation(): void;

interface QUnitStartOptions {
/**
* If `false` tests will not be loaded automatically.
Expand Down Expand Up @@ -116,11 +118,6 @@ interface QUnitStartOptions {
*/
setupEmberTesting?: boolean | undefined;

/**
* If `false` validation of `Ember.onerror` will be disabled.
*/
setupEmberOnerrorValidation?: boolean | undefined;

/**
* If `false` test isolation validation will be disabled.
*/
Expand Down

0 comments on commit 634761b

Please sign in to comment.