Skip to content

Commit

Permalink
Add required deprecation fields for Ember 4
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Oct 24, 2022
1 parent 5533d49 commit 77722bd
Showing 1 changed file with 125 additions and 0 deletions.
125 changes: 125 additions & 0 deletions tests/unit/assertions/expect-deprecation-test.js
Expand Up @@ -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',
},
});
// ............................................................

Expand All @@ -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();
Expand All @@ -39,6 +49,11 @@ 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',
},
},
},
],
Expand Down Expand Up @@ -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',
},
});
});

Expand All @@ -76,6 +96,11 @@ 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',
},
},
},
],
Expand Down Expand Up @@ -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',
},
});
});

Expand All @@ -115,6 +145,11 @@ 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',
},
},
},
],
Expand All @@ -132,6 +167,11 @@ 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',
},
},
},
],
Expand All @@ -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/);
Expand All @@ -157,6 +202,11 @@ 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',
},
},
},
],
Expand All @@ -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/);
Expand All @@ -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/);

Expand All @@ -198,6 +258,11 @@ 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',
},
},
},
],
Expand All @@ -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/);

Expand All @@ -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/);

Expand All @@ -254,13 +334,23 @@ 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');

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.*');

Expand Down Expand Up @@ -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();
Expand All @@ -316,6 +411,11 @@ 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',
},
},
},
],
Expand All @@ -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',
},
});
});

Expand All @@ -341,6 +446,11 @@ 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',
},
},
},
],
Expand Down Expand Up @@ -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',
},
});
});

Expand All @@ -378,6 +493,11 @@ 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',
},
},
},
],
Expand All @@ -397,6 +517,11 @@ 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',
},
},
},
],
Expand Down

0 comments on commit 77722bd

Please sign in to comment.