From ae1622c5dbe1bef06b40fa13f7c81fde93b495a6 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Sat, 10 Oct 2026 12:01:38 -0400 Subject: [PATCH 1/2] Use the public mixins in tests, not the internal copies Tests imported the silent `-internal` copies of the deprecated mixins. Such a test stays after the deprecation is removed, and it keeps the internal copy in use. These tests now import the public mixin, expect its deprecation, and use `testUnless(...isRemoved)`. They go away with the deprecation. - `EmberArray` in `runtime/tests/mixins/array_test.js` - `MutableArray` in `glimmer/tests/integration/helpers/tracked-test.js` - `ContainerProxyMixin` in `container_proxy_test.js` - `TargetActionSupport` in `target_action_support_test.js` - `_ProxyMixin` in `ember/tests/service_injection_test.js` `TestArray#init` in `array_test.js` now calls `super.init`. Without that call, the deprecation of the mixin does not fire. Three tests in `array_test.js` do not use the mixin. They moved to their own module, so they still run after the removal. `mixin/deprecation_test.js` still imports `InternalMixin`. That test checks that the internal constructor does not fire the deprecation. Co-Authored-By: Claude Opus 5.5 --- .../tests/integration/helpers/tracked-test.js | 20 ++++- .../runtime/tests/mixins/array_test.js | 78 +++++++++++++++---- .../tests/mixins/container_proxy_test.js | 21 +++-- .../mixins/target_action_support_test.js | 29 ++++--- .../ember/tests/service_injection_test.js | 19 ++++- 5 files changed, 127 insertions(+), 40 deletions(-) diff --git a/packages/@ember/-internals/glimmer/tests/integration/helpers/tracked-test.js b/packages/@ember/-internals/glimmer/tests/integration/helpers/tracked-test.js index 2aed389bace..2fd141bebd5 100644 --- a/packages/@ember/-internals/glimmer/tests/integration/helpers/tracked-test.js +++ b/packages/@ember/-internals/glimmer/tests/integration/helpers/tracked-test.js @@ -1,9 +1,16 @@ import EmberObject from '@ember/object'; import { A } from '@ember/array'; +import MutableArray from '@ember/array/mutable'; import { tracked, notifyPropertyChange } from '@ember/-internals/metal'; -import { InternalMutableArray as MutableArray } from '@ember/array/index-internal'; import Service, { service } from '@ember/service'; -import { moduleFor, RenderingTestCase, runTask } from 'internal-test-helpers'; +import { + expectDeprecation, + moduleFor, + RenderingTestCase, + runTask, + testUnless, +} from 'internal-test-helpers'; +import { DEPRECATIONS } from '@ember/-internals/deprecations'; import { precompileTemplate } from '@ember/template-compilation'; import { setComponentTemplate } from '@glimmer/manager'; @@ -172,7 +179,14 @@ moduleFor( this.assertText('1, 2, 3, 4'); } - '@test custom ember array properties rerender when updated'() { + [`${testUnless( + DEPRECATIONS.DEPRECATE_MUTABLE_ARRAY_MIXIN.isRemoved + )} @test custom ember array properties rerender when updated`]() { + expectDeprecation( + /The `MutableArray` mixin is deprecated/, + DEPRECATIONS.DEPRECATE_MUTABLE_ARRAY_MIXIN.isEnabled + ); + let CustomArray = class extends EmberObject.extend(MutableArray) { init() { super.init(...arguments); diff --git a/packages/@ember/-internals/runtime/tests/mixins/array_test.js b/packages/@ember/-internals/runtime/tests/mixins/array_test.js index 3ec1baed666..8e47fdd49a5 100644 --- a/packages/@ember/-internals/runtime/tests/mixins/array_test.js +++ b/packages/@ember/-internals/runtime/tests/mixins/array_test.js @@ -7,9 +7,21 @@ import { arrayContentWillChange, } from '@ember/-internals/metal'; import EmberObject, { get, set, computed, observer as emberObserver } from '@ember/object'; -import { A as emberA } from '@ember/array'; -import { InternalEmberArray as EmberArray } from '@ember/array/index-internal'; -import { moduleFor, AbstractTestCase, runLoopSettled } from 'internal-test-helpers'; +import EmberArray, { A as emberA } from '@ember/array'; +import { + expectDeprecation, + moduleFor, + AbstractTestCase, + runLoopSettled, + testUnless, +} from 'internal-test-helpers'; +import { DEPRECATIONS } from '../../../deprecations'; + +const MIXIN = DEPRECATIONS.DEPRECATE_EMBER_ARRAY_MIXIN; + +function expectMixinDeprecation() { + expectDeprecation(/The `EmberArray` mixin is deprecated/, MIXIN.isEnabled); +} /* Implement a basic fake mutable array. This validates that any non-native @@ -19,6 +31,7 @@ const TestArray = class extends EmberObject.extend(EmberArray) { _content = null; init() { + super.init(...arguments); this._content = this._content || []; } @@ -50,7 +63,11 @@ const TestArray = class extends EmberObject.extend(EmberArray) { moduleFor( 'Ember.Array', class extends AbstractTestCase { - ['@test the return value of slice has Ember.Array applied'](assert) { + [`${testUnless(MIXIN.isRemoved)} @test the return value of slice has Ember.Array applied`]( + assert + ) { + expectMixinDeprecation(); + let x = EmberObject.extend(EmberArray).create({ length: 0, }); @@ -58,7 +75,9 @@ moduleFor( assert.equal(EmberArray.detect(y), true, 'mixin should be applied'); } - ['@test slice supports negative index arguments'](assert) { + [`${testUnless(MIXIN.isRemoved)} @test slice supports negative index arguments`](assert) { + expectMixinDeprecation(); + let testArray = TestArray.create({ _content: [1, 2, 3, 4] }); assert.deepEqual(testArray.slice(-2), [3, 4], 'slice(-2)'); @@ -97,7 +116,9 @@ let obj, observer; moduleFor( 'mixins/array/arrayContent[Will|Did]Change', class extends AbstractTestCase { - async ['@test should notify observers of []'](assert) { + async [`${testUnless(MIXIN.isRemoved)} @test should notify observers of []`](assert) { + expectMixinDeprecation(); + obj = DummyArray.extend({ enumerablePropertyDidChange: emberObserver('[]', function () { this._count++; @@ -130,6 +151,8 @@ moduleFor( 'notify observers of length', class extends AbstractTestCase { beforeEach(assert) { + expectMixinDeprecation(); + obj = DummyArray.extend({ lengthDidChange: emberObserver('length', function () { this._after++; @@ -146,7 +169,9 @@ moduleFor( obj = undefined; } - async ['@test should notify observers when call with no params'](assert) { + async [`${testUnless(MIXIN.isRemoved)} @test should notify observers when call with no params`]( + assert + ) { arrayContentWillChange(obj); await runLoopSettled(); @@ -159,7 +184,9 @@ moduleFor( } // API variation that included items only - async ['@test should not notify when passed lengths are same'](assert) { + async [`${testUnless(MIXIN.isRemoved)} @test should not notify when passed lengths are same`]( + assert + ) { arrayContentWillChange(obj, 0, 1, 1); await runLoopSettled(); @@ -171,7 +198,9 @@ moduleFor( assert.equal(obj._after, 0); } - async ['@test should notify when passed lengths are different'](assert) { + async [`${testUnless(MIXIN.isRemoved)} @test should notify when passed lengths are different`]( + assert + ) { arrayContentWillChange(obj, 0, 1, 2); await runLoopSettled(); @@ -193,6 +222,8 @@ moduleFor( 'notify array observers (internal)', class extends AbstractTestCase { beforeEach(assert) { + expectMixinDeprecation(); + obj = DummyArray.create(); observer = class extends EmberObject { @@ -220,7 +251,9 @@ moduleFor( obj = observer = null; } - ['@test should notify array observers when called with no params'](assert) { + [`${testUnless(MIXIN.isRemoved)} @test should notify array observers when called with no params`]( + assert + ) { arrayContentWillChange(obj); assert.deepEqual(observer._before, [obj, 0, -1, -1]); @@ -229,7 +262,9 @@ moduleFor( } // API variation that included items only - ['@test should notify when called with same length items'](assert) { + [`${testUnless(MIXIN.isRemoved)} @test should notify when called with same length items`]( + assert + ) { arrayContentWillChange(obj, 0, 1, 1); assert.deepEqual(observer._before, [obj, 0, 1, 1]); @@ -237,7 +272,9 @@ moduleFor( assert.deepEqual(observer._after, [obj, 0, 1, 1]); } - ['@test should notify when called with diff length items'](assert) { + [`${testUnless(MIXIN.isRemoved)} @test should notify when called with diff length items`]( + assert + ) { arrayContentWillChange(obj, 0, 2, 1); assert.deepEqual(observer._before, [obj, 0, 2, 1]); @@ -245,7 +282,7 @@ moduleFor( assert.deepEqual(observer._after, [obj, 0, 2, 1]); } - ['@test removing array observer should disable'](assert) { + [`${testUnless(MIXIN.isRemoved)} @test removing array observer should disable`](assert) { removeArrayObserver(obj, observer, { willChange: 'arrayWillChange', didChange: 'arrayDidChange', @@ -269,6 +306,8 @@ moduleFor( 'EmberArray.@each support', class extends AbstractTestCase { beforeEach() { + expectMixinDeprecation(); + ary = TestArray.create({ _content: [ { isDone: true, desc: 'Todo 1' }, @@ -284,7 +323,9 @@ moduleFor( ary = null; } - async ['@test adding an object should notify (@each.isDone)'](assert) { + async [`${testUnless(MIXIN.isRemoved)} @test adding an object should notify (@each.isDone)`]( + assert + ) { let called = 0; let observerObject = EmberObject.create({ @@ -306,7 +347,9 @@ moduleFor( assert.equal(called, 1, 'calls observer when object is pushed'); } - async ['@test using @each to observe arrays that does not return objects raise error'](assert) { + async [`${testUnless(MIXIN.isRemoved)} @test using @each to observe arrays that does not return objects raise error`]( + assert + ) { let called = 0; let observerObject = EmberObject.create({ @@ -333,7 +376,12 @@ moduleFor( await runLoopSettled(); assert.equal(called, 0, 'not calls observer when object is pushed'); } + } +); +moduleFor( + '@each support', + class extends AbstractTestCase { ['@test `objectAt` returns correct object'](assert) { let arr = ['first', 'second', 'third', 'fourth']; assert.equal(objectAt(arr, 2), 'third'); diff --git a/packages/@ember/-internals/runtime/tests/mixins/container_proxy_test.js b/packages/@ember/-internals/runtime/tests/mixins/container_proxy_test.js index 445e4eceedc..a8f3b97eec9 100644 --- a/packages/@ember/-internals/runtime/tests/mixins/container_proxy_test.js +++ b/packages/@ember/-internals/runtime/tests/mixins/container_proxy_test.js @@ -1,15 +1,20 @@ import { getOwner } from '@ember/-internals/owner'; import { Container, Registry } from '@ember/-internals/container'; -import ContainerProxy from '../../lib/mixins/container_proxy-internal'; +import ContainerProxy from '../../lib/mixins/container_proxy'; import EmberObject from '@ember/object'; import { run, schedule } from '@ember/runloop'; -import { moduleFor, AbstractTestCase } from 'internal-test-helpers'; +import { expectDeprecation, moduleFor, AbstractTestCase, testUnless } from 'internal-test-helpers'; +import { DEPRECATIONS } from '../../../deprecations'; import { destroy } from '@glimmer/destroyable'; +const MIXIN = DEPRECATIONS.DEPRECATE_CONTAINER_PROXY_MIXIN; + moduleFor( '@ember/-internals/runtime/mixins/container_proxy', class extends AbstractTestCase { beforeEach() { + expectDeprecation(/The `ContainerProxyMixin` mixin is deprecated/, MIXIN.isEnabled); + this.Owner = EmberObject.extend(ContainerProxy); this.instance = this.Owner.create(); @@ -20,14 +25,14 @@ moduleFor( }); } - ['@test provides ownerInjection helper method'](assert) { + [`${testUnless(MIXIN.isRemoved)} @test provides ownerInjection helper method`](assert) { let result = this.instance.ownerInjection(); assert.equal(getOwner(result), this.instance, 'returns an object with an associated owner'); } - ['@test actions queue completes before destruction'](assert) { - assert.expect(1); + [`${testUnless(MIXIN.isRemoved)} @test actions queue completes before destruction`](assert) { + assert.expect(2); this.registry.register( 'service:auth', @@ -46,10 +51,12 @@ moduleFor( }); } - '@test being destroyed by @ember/destroyable properly destroys the container and created instances'( + [`${testUnless( + MIXIN.isRemoved + )} @test being destroyed by @ember/destroyable properly destroys the container and created instances`]( assert ) { - assert.expect(1); + assert.expect(2); this.registry.register( 'service:foo', diff --git a/packages/@ember/-internals/runtime/tests/mixins/target_action_support_test.js b/packages/@ember/-internals/runtime/tests/mixins/target_action_support_test.js index e2b205a93db..962635b1f05 100644 --- a/packages/@ember/-internals/runtime/tests/mixins/target_action_support_test.js +++ b/packages/@ember/-internals/runtime/tests/mixins/target_action_support_test.js @@ -1,6 +1,6 @@ import { context } from '@ember/-internals/environment'; import EmberObject from '@ember/object'; -import TargetActionSupport from '../../lib/mixins/target_action_support-internal'; +import TargetActionSupport from '../../lib/mixins/target_action_support'; import { expectDeprecation, moduleFor, AbstractTestCase, testUnless } from 'internal-test-helpers'; import { DEPRECATIONS } from '../../../deprecations'; @@ -12,6 +12,11 @@ moduleFor( class extends AbstractTestCase { beforeEach() { context.lookup = lookup = {}; + + expectDeprecation( + /The `TargetActionSupport` mixin is deprecated/, + DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled + ); } afterEach() { @@ -21,7 +26,7 @@ moduleFor( [`${testUnless( DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isRemoved )} @test it should return false if no target or action are specified`](assert) { - assert.expect(2); + assert.expect(3); expectDeprecation( /Calling `triggerAction` on/, @@ -36,7 +41,7 @@ moduleFor( [`${testUnless( DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isRemoved )} @test it should support actions specified as strings`](assert) { - assert.expect(3); + assert.expect(4); expectDeprecation( /Calling `triggerAction` on/, @@ -59,7 +64,7 @@ moduleFor( [`${testUnless( DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isRemoved )} @test it should invoke the send() method on objects that implement it`](assert) { - assert.expect(4); + assert.expect(5); expectDeprecation( /Calling `triggerAction` on/, @@ -83,7 +88,7 @@ moduleFor( [`${testUnless( DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isRemoved )} @test it should find targets specified using a property path`](assert) { - assert.expect(3); + assert.expect(4); expectDeprecation( /Calling `triggerAction` on/, @@ -110,7 +115,7 @@ moduleFor( [`${testUnless( DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isRemoved )} @test it should use an actionContext object specified as a property on the object`](assert) { - assert.expect(3); + assert.expect(4); expectDeprecation( /Calling `triggerAction` on/, @@ -136,7 +141,7 @@ moduleFor( [`${testUnless( DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isRemoved )} @test it should find an actionContext specified as a property path`](assert) { - assert.expect(3); + assert.expect(4); expectDeprecation( /Calling `triggerAction` on/, @@ -163,7 +168,7 @@ moduleFor( [`${testUnless( DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isRemoved )} @test it should use the target specified in the argument`](assert) { - assert.expect(3); + assert.expect(4); expectDeprecation( /Calling `triggerAction` on/, @@ -188,7 +193,7 @@ moduleFor( [`${testUnless( DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isRemoved )} @test it should use the action specified in the argument`](assert) { - assert.expect(3); + assert.expect(4); expectDeprecation( /Calling `triggerAction` on/, @@ -212,7 +217,7 @@ moduleFor( [`${testUnless( DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isRemoved )} @test it should use the actionContext specified in the argument`](assert) { - assert.expect(3); + assert.expect(4); expectDeprecation( /Calling `triggerAction` on/, @@ -238,7 +243,7 @@ moduleFor( [`${testUnless( DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isRemoved )} @test it should allow multiple arguments from actionContext`](assert) { - assert.expect(4); + assert.expect(5); expectDeprecation( /Calling `triggerAction` on/, @@ -272,7 +277,7 @@ moduleFor( [`${testUnless( DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isRemoved )} @test it should use a null value specified in the actionContext argument`](assert) { - assert.expect(3); + assert.expect(4); expectDeprecation( /Calling `triggerAction` on/, diff --git a/packages/ember/tests/service_injection_test.js b/packages/ember/tests/service_injection_test.js index abcd39580fd..f30de7e8507 100644 --- a/packages/ember/tests/service_injection_test.js +++ b/packages/ember/tests/service_injection_test.js @@ -1,8 +1,14 @@ import { getOwner } from '@ember/-internals/owner'; import Controller from '@ember/controller'; import Service, { service } from '@ember/service'; -import _ProxyMixin from '@ember/-internals/runtime/lib/mixins/-proxy-internal'; -import { moduleFor, ApplicationTestCase } from 'internal-test-helpers'; +import { _ProxyMixin } from '@ember/-internals/runtime'; +import { + expectDeprecation, + moduleFor, + ApplicationTestCase, + testUnless, +} from 'internal-test-helpers'; +import { DEPRECATIONS } from '@ember/-internals/deprecations'; import { computed } from '@ember/object'; import { precompileTemplate } from '@ember/template-compilation'; @@ -27,7 +33,14 @@ moduleFor( assert.ok(controller.get('myService') instanceof MyService); } - async ['@test Service can be an object proxy and access owner in init GH#16484'](assert) { + async [`${testUnless( + DEPRECATIONS.DEPRECATE_PROXY_MIXIN.isRemoved + )} @test Service can be an object proxy and access owner in init GH#16484`](assert) { + expectDeprecation( + /The `ProxyMixin` mixin is deprecated/, + DEPRECATIONS.DEPRECATE_PROXY_MIXIN.isEnabled + ); + let serviceOwner; this.add( From d106fc3f44a2269955034d84ecfc5fd0e239e45b Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Sat, 10 Oct 2026 12:37:43 -0400 Subject: [PATCH 2/2] Fix the assertion count in the TargetActionSupport tests A production build runs one assertion for all deprecation expectations of a test. A development build runs one assertion for each expectation. Two expectations made `assert.expect` fail in the production build jobs. Each test now has one expectation. Its pattern matches the mixin deprecation and the `triggerAction` deprecation. The `assert.expect` counts are back to their values on the base branch. Co-Authored-By: Claude Opus 5.5 --- .../mixins/target_action_support_test.js | 86 ++++++------------- 1 file changed, 26 insertions(+), 60 deletions(-) diff --git a/packages/@ember/-internals/runtime/tests/mixins/target_action_support_test.js b/packages/@ember/-internals/runtime/tests/mixins/target_action_support_test.js index 962635b1f05..d1ea1cf96a0 100644 --- a/packages/@ember/-internals/runtime/tests/mixins/target_action_support_test.js +++ b/packages/@ember/-internals/runtime/tests/mixins/target_action_support_test.js @@ -4,6 +4,10 @@ import TargetActionSupport from '../../lib/mixins/target_action_support'; import { expectDeprecation, moduleFor, AbstractTestCase, testUnless } from 'internal-test-helpers'; import { DEPRECATIONS } from '../../../deprecations'; +// A production build runs one assertion for all deprecation expectations. +// One pattern keeps the assertion count equal in both builds. +const DEPRECATION = /The `TargetActionSupport` mixin is deprecated|Calling `triggerAction` on/; + let originalLookup = context.lookup; let lookup; @@ -12,11 +16,6 @@ moduleFor( class extends AbstractTestCase { beforeEach() { context.lookup = lookup = {}; - - expectDeprecation( - /The `TargetActionSupport` mixin is deprecated/, - DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled - ); } afterEach() { @@ -26,12 +25,9 @@ moduleFor( [`${testUnless( DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isRemoved )} @test it should return false if no target or action are specified`](assert) { - assert.expect(3); + assert.expect(2); - expectDeprecation( - /Calling `triggerAction` on/, - DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled - ); + expectDeprecation(DEPRECATION, DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled); let obj = EmberObject.extend(TargetActionSupport).create(); @@ -41,12 +37,9 @@ moduleFor( [`${testUnless( DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isRemoved )} @test it should support actions specified as strings`](assert) { - assert.expect(4); + assert.expect(3); - expectDeprecation( - /Calling `triggerAction` on/, - DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled - ); + expectDeprecation(DEPRECATION, DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled); let obj = EmberObject.extend(TargetActionSupport).create({ target: EmberObject.create({ @@ -64,12 +57,9 @@ moduleFor( [`${testUnless( DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isRemoved )} @test it should invoke the send() method on objects that implement it`](assert) { - assert.expect(5); + assert.expect(4); - expectDeprecation( - /Calling `triggerAction` on/, - DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled - ); + expectDeprecation(DEPRECATION, DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled); let obj = EmberObject.extend(TargetActionSupport).create({ target: EmberObject.create({ @@ -88,12 +78,9 @@ moduleFor( [`${testUnless( DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isRemoved )} @test it should find targets specified using a property path`](assert) { - assert.expect(4); + assert.expect(3); - expectDeprecation( - /Calling `triggerAction` on/, - DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled - ); + expectDeprecation(DEPRECATION, DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled); let Test = {}; lookup.Test = Test; @@ -115,12 +102,9 @@ moduleFor( [`${testUnless( DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isRemoved )} @test it should use an actionContext object specified as a property on the object`](assert) { - assert.expect(4); + assert.expect(3); - expectDeprecation( - /Calling `triggerAction` on/, - DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled - ); + expectDeprecation(DEPRECATION, DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled); let obj = EmberObject.extend(TargetActionSupport).create({ action: 'anEvent', @@ -141,12 +125,9 @@ moduleFor( [`${testUnless( DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isRemoved )} @test it should find an actionContext specified as a property path`](assert) { - assert.expect(4); + assert.expect(3); - expectDeprecation( - /Calling `triggerAction` on/, - DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled - ); + expectDeprecation(DEPRECATION, DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled); let Test = {}; lookup.Test = Test; @@ -168,12 +149,9 @@ moduleFor( [`${testUnless( DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isRemoved )} @test it should use the target specified in the argument`](assert) { - assert.expect(4); + assert.expect(3); - expectDeprecation( - /Calling `triggerAction` on/, - DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled - ); + expectDeprecation(DEPRECATION, DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled); let targetObj = EmberObject.create({ anEvent() { @@ -193,12 +171,9 @@ moduleFor( [`${testUnless( DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isRemoved )} @test it should use the action specified in the argument`](assert) { - assert.expect(4); + assert.expect(3); - expectDeprecation( - /Calling `triggerAction` on/, - DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled - ); + expectDeprecation(DEPRECATION, DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled); let obj = EmberObject.extend(TargetActionSupport).create({ target: EmberObject.create({ @@ -217,12 +192,9 @@ moduleFor( [`${testUnless( DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isRemoved )} @test it should use the actionContext specified in the argument`](assert) { - assert.expect(4); + assert.expect(3); - expectDeprecation( - /Calling `triggerAction` on/, - DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled - ); + expectDeprecation(DEPRECATION, DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled); let context = {}; let obj = EmberObject.extend(TargetActionSupport).create({ @@ -243,12 +215,9 @@ moduleFor( [`${testUnless( DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isRemoved )} @test it should allow multiple arguments from actionContext`](assert) { - assert.expect(5); + assert.expect(4); - expectDeprecation( - /Calling `triggerAction` on/, - DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled - ); + expectDeprecation(DEPRECATION, DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled); let param1 = 'someParam'; let param2 = 'someOtherParam'; @@ -277,12 +246,9 @@ moduleFor( [`${testUnless( DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isRemoved )} @test it should use a null value specified in the actionContext argument`](assert) { - assert.expect(4); + assert.expect(3); - expectDeprecation( - /Calling `triggerAction` on/, - DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled - ); + expectDeprecation(DEPRECATION, DEPRECATIONS.DEPRECATE_TARGET_ACTION_SUPPORT.isEnabled); let obj = EmberObject.extend(TargetActionSupport).create({ target: EmberObject.create({