From 9afc11cd144c6b5ce5d886af767dc7738dd3138e Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 24 Oct 2022 14:16:58 -0400 Subject: [PATCH] Add required deprecation fields for Ember 4 --- .../assertions/expect-deprecation-test.js | 157 ++++++++++++++++-- 1 file changed, 141 insertions(+), 16 deletions(-) diff --git a/tests/unit/assertions/expect-deprecation-test.js b/tests/unit/assertions/expect-deprecation-test.js index 2796daf2..721d4c63 100644 --- a/tests/unit/assertions/expect-deprecation-test.js +++ b/tests/unit/assertions/expect-deprecation-test.js @@ -7,6 +7,11 @@ import { setupTest } from 'ember-qunit'; deprecate('Deprecation outside of a test', false, { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }); // ............................................................ @@ -28,6 +33,11 @@ module('expectDeprecation', function (hooks) { deprecate('Something deprecated', false, { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }); mockAssert.expectDeprecation(); @@ -39,12 +49,17 @@ module('expectDeprecation', function (hooks) { options: { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }, }, ], expected: null, message: - 'Expected deprecations during test, but no deprecations were found.', + 'Expected deprecations during test, but no deprecations were found.', result: true, }); }); @@ -56,7 +71,7 @@ module('expectDeprecation', function (hooks) { actual: [], expected: null, message: - 'Expected deprecations during test, but no deprecations were found.', + 'Expected deprecations during test, but no deprecations were found.', result: false, }); }); @@ -66,6 +81,11 @@ module('expectDeprecation', function (hooks) { deprecate('Something deprecated', false, { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }); }); @@ -76,12 +96,17 @@ module('expectDeprecation', function (hooks) { options: { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }, }, ], expected: null, message: - 'Expected deprecations during test, but no deprecations were found.', + 'Expected deprecations during test, but no deprecations were found.', result: true, }); }); @@ -93,7 +118,7 @@ module('expectDeprecation', function (hooks) { actual: [], expected: null, message: - 'Expected deprecations during test, but no deprecations were found.', + 'Expected deprecations during test, but no deprecations were found.', result: false, }); }); @@ -103,6 +128,11 @@ module('expectDeprecation', function (hooks) { deprecate('Something deprecated', false, { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }); }); @@ -115,12 +145,17 @@ module('expectDeprecation', function (hooks) { options: { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }, }, ], expected: null, message: - 'Expected deprecations during test, but no deprecations were found.', + 'Expected deprecations during test, but no deprecations were found.', result: true, }); @@ -132,12 +167,17 @@ module('expectDeprecation', function (hooks) { options: { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }, }, ], expected: null, message: - 'Expected deprecations during test, but no deprecations were found.', + 'Expected deprecations during test, but no deprecations were found.', result: true, }); }); @@ -146,6 +186,11 @@ module('expectDeprecation', function (hooks) { deprecate('Something deprecated', false, { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }); mockAssert.expectDeprecation(/Something deprecated/); @@ -157,13 +202,18 @@ module('expectDeprecation', function (hooks) { options: { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }, }, ], expected: null, result: true, message: - 'Expected deprecations during test, but no deprecations were found.', + 'Expected deprecations during test, but no deprecations were found.', }); }); @@ -171,6 +221,11 @@ module('expectDeprecation', function (hooks) { deprecate('Something deprecated', false, { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }); mockAssert.expectDeprecation(/different deprecation/); @@ -178,7 +233,7 @@ module('expectDeprecation', function (hooks) { actual: [], expected: null, message: - 'Expected deprecations during test, but no deprecations were found.', + 'Expected deprecations during test, but no deprecations were found.', result: false, }); }); @@ -188,6 +243,11 @@ module('expectDeprecation', function (hooks) { deprecate('Something deprecated', false, { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }); }, /Something deprecated/); @@ -198,12 +258,17 @@ module('expectDeprecation', function (hooks) { options: { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }, }, ], expected: null, message: - 'Expected deprecations during test, but no deprecations were found.', + 'Expected deprecations during test, but no deprecations were found.', result: true, }); }); @@ -213,6 +278,11 @@ module('expectDeprecation', function (hooks) { deprecate('Something deprecated', false, { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }); }, /different deprecation/); @@ -220,7 +290,7 @@ module('expectDeprecation', function (hooks) { actual: [], expected: null, message: - 'Expected deprecations during test, but no deprecations were found.', + 'Expected deprecations during test, but no deprecations were found.', result: false, }); }); @@ -230,12 +300,22 @@ module('expectDeprecation', function (hooks) { deprecate('Something deprecated', false, { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }); }, /Somethi[a-z ]*ecated/); mockAssert.expectDeprecation(() => { deprecate('/Something* deprecated/', false, { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }); }, /Something* deprecated/); @@ -254,6 +334,11 @@ module('expectDeprecation', function (hooks) { deprecate('Something deprecated', false, { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }); }, 'Something'); @@ -261,6 +346,11 @@ module('expectDeprecation', function (hooks) { deprecate('Something deprecated', false, { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }); }, 'Something.*'); @@ -296,7 +386,7 @@ module('expectNoDeprecation', function (hooks) { actual: [], expected: [], message: - 'Expected no deprecations during test, but deprecations were found.', + 'Expected no deprecations during test, but deprecations were found.', result: true, }); }); @@ -306,6 +396,11 @@ module('expectNoDeprecation', function (hooks) { deprecate('Something deprecated', false, { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }); mockAssert.expectNoDeprecation(); @@ -316,12 +411,17 @@ module('expectNoDeprecation', function (hooks) { options: { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }, }, ], expected: [], message: - 'Expected no deprecations during test, but deprecations were found.', + 'Expected no deprecations during test, but deprecations were found.', result: false, }); }); @@ -331,6 +431,11 @@ module('expectNoDeprecation', function (hooks) { deprecate('Something deprecated', false, { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }); }); @@ -341,12 +446,17 @@ module('expectNoDeprecation', function (hooks) { options: { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + }, }, }, ], expected: [], message: - 'Expected no deprecations during test, but deprecations were found.', + 'Expected no deprecations during test, but deprecations were found.', result: false, }); }); @@ -358,7 +468,7 @@ module('expectNoDeprecation', function (hooks) { actual: [], expected: [], message: - 'Expected no deprecations during test, but deprecations were found.', + 'Expected no deprecations during test, but deprecations were found.', result: true, }); }); @@ -368,6 +478,11 @@ module('expectNoDeprecation', function (hooks) { deprecate('Something deprecated', false, { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }); }); @@ -378,12 +493,17 @@ module('expectNoDeprecation', function (hooks) { options: { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }, }, ], expected: [], message: - 'Expected no deprecations during test, but deprecations were found.', + 'Expected no deprecations during test, but deprecations were found.', result: false, }); @@ -397,12 +517,17 @@ module('expectNoDeprecation', function (hooks) { options: { id: 'deprecation-test', until: '3.0.0', + for: 'ember-qunit-tests', + since: { + available: '6.1.0', + enabled: '6.1.0', + } }, }, ], expected: [], message: - 'Expected no deprecations during test, but deprecations were found.', + 'Expected no deprecations during test, but deprecations were found.', result: false, }); });