diff --git a/packages/@ember/runloop/index.js b/packages/@ember/runloop/index.js index b8abd69ff54..ef25f6e853a 100644 --- a/packages/@ember/runloop/index.js +++ b/packages/@ember/runloop/index.js @@ -1,4 +1,4 @@ -import { assert, deprecate, isTesting } from '@ember/debug'; +import { assert, deprecate } from '@ember/debug'; import { onErrorTarget } from 'ember-error-handling'; import { beginPropertyChanges, endPropertyChanges } from 'ember-metal'; import Backburner from 'backburner'; @@ -325,11 +325,6 @@ export function end() { @public */ export function schedule(queue /*, target, method */) { - assert( - `You have turned on testing mode, which disabled the run-loop's autorun. ` + - `You will need to wrap any code with asynchronous side-effects in a run`, - currentRunLoop || !isTesting() - ); deprecate(`Scheduling into the '${queue}' run loop queue is deprecated.`, queue !== 'sync', { id: 'ember-metal.run.sync', until: '3.5.0', @@ -398,11 +393,6 @@ export function later(/*target, method*/) { @public */ export function once(...args) { - assert( - `You have turned on testing mode, which disabled the run-loop's autorun. ` + - `You will need to wrap any code with asynchronous side-effects in a run`, - currentRunLoop || !isTesting() - ); args.unshift('actions'); return backburner.scheduleOnce(...args); } @@ -480,11 +470,6 @@ export function once(...args) { @public */ export function scheduleOnce(queue /*, target, method*/) { - assert( - `You have turned on testing mode, which disabled the run-loop's autorun. ` + - `You will need to wrap any code with asynchronous side-effects in a run`, - currentRunLoop || !isTesting() - ); deprecate(`Scheduling into the '${queue}' run loop queue is deprecated.`, queue !== 'sync', { id: 'ember-metal.run.sync', until: '3.5.0', diff --git a/packages/@ember/runloop/tests/schedule_test.js b/packages/@ember/runloop/tests/schedule_test.js index 292f2a1d3f8..416f008839a 100644 --- a/packages/@ember/runloop/tests/schedule_test.js +++ b/packages/@ember/runloop/tests/schedule_test.js @@ -82,18 +82,5 @@ moduleFor( assert.deepEqual(order, ['sync', 'actions', 'sync', 'actions', 'destroy']); } - - ['@test makes sure it does not trigger an autorun during testing']() { - expectAssertion( - () => schedule('actions', () => {}), - /wrap any code with asynchronous side-effects in a run/ - ); - - // make sure not just the first violation is asserted. - expectAssertion( - () => schedule('actions', () => {}), - /wrap any code with asynchronous side-effects in a run/ - ); - } } );