-
-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate legacy test APIs
- Loading branch information
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
addon-test-support/ember-qunit/legacy-2-x/module-for-component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
import { createModule } from './qunit-module'; | ||
import { TestModuleForComponent } from 'ember-test-helpers'; | ||
import { deprecate } from '@ember/application/deprecations'; | ||
|
||
export default function moduleForComponent(name, description, callbacks) { | ||
createModule(TestModuleForComponent, name, description, callbacks); | ||
deprecate( | ||
`The usage "moduleForComponent" is deprecated. Please migrate the "${name}" module to use "setupRenderingTest".`, | ||
false, | ||
{ | ||
id: 'ember-qunit.deprecate-legacy-apis', | ||
until: '5.0.0', | ||
url: 'https://github.com/emberjs/ember-qunit/blob/master/docs/migration.md', | ||
} | ||
); | ||
} |
10 changes: 10 additions & 0 deletions
10
addon-test-support/ember-qunit/legacy-2-x/module-for-model.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
import { createModule } from './qunit-module'; | ||
import { TestModuleForModel } from 'ember-test-helpers'; | ||
import { deprecate } from '@ember/application/deprecations'; | ||
|
||
export default function moduleForModel(name, description, callbacks) { | ||
deprecate( | ||
`The usage "moduleForModel" is deprecated. Please migrate the "${name}" module to the new test APIs.`, | ||
false, | ||
{ | ||
id: 'ember-qunit.deprecate-legacy-apis', | ||
until: '5.0.0', | ||
url: 'https://github.com/emberjs/ember-qunit/blob/master/docs/migration.md', | ||
} | ||
); | ||
createModule(TestModuleForModel, name, description, callbacks); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
import { createModule } from './qunit-module'; | ||
import { TestModule } from 'ember-test-helpers'; | ||
import { deprecate } from '@ember/application/deprecations'; | ||
|
||
export default function moduleFor(name, description, callbacks) { | ||
deprecate( | ||
`The usage "moduleFor" is deprecated. Please migrate the "${name}" module to use "module"`, | ||
false, | ||
{ | ||
id: 'ember-qunit.deprecate-legacy-apis', | ||
until: '5.0.0', | ||
url: 'https://github.com/emberjs/ember-qunit/blob/master/docs/migration.md', | ||
} | ||
); | ||
createModule(TestModule, name, description, callbacks); | ||
} |