-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor to use existing
shouldTransformTypeScript
infrastructure
`
- Loading branch information
1 parent
7ed8d2f
commit 25aa489
Showing
11 changed files
with
164 additions
and
22 deletions.
There are no files selected for viewing
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
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { | ||
setupApplicationTest as upstreamSetupApplicationTest, | ||
setupRenderingTest as upstreamSetupRenderingTest, | ||
setupTest as upstreamSetupTest, | ||
} from 'ember-qunit'; | ||
|
||
// This file exists to provide wrappers around ember-qunit's / ember-mocha's | ||
// test setup functions. This way, you can easily extend the setup that is | ||
// needed per test type. | ||
|
||
function setupApplicationTest( | ||
hooks: Parameters<typeof upstreamSetupApplicationTest>[0], | ||
options?: Parameters<typeof upstreamSetupApplicationTest>[1] | ||
) { | ||
upstreamSetupApplicationTest(hooks, options); | ||
|
||
// Additional setup for application tests can be done here. | ||
// | ||
// For example, if you need an authenticated session for each | ||
// application test, you could do: | ||
// | ||
// hooks.beforeEach(async function () { | ||
// await authenticateSession(); // ember-simple-auth | ||
// }); | ||
// | ||
// This is also a good place to call test setup functions coming | ||
// from other addons: | ||
// | ||
// setupIntl(hooks); // ember-intl | ||
// setupMirage(hooks); // ember-cli-mirage | ||
} | ||
|
||
function setupRenderingTest( | ||
hooks: Parameters<typeof upstreamSetupApplicationTest>[0], | ||
options?: Parameters<typeof upstreamSetupApplicationTest>[1] | ||
) { | ||
upstreamSetupRenderingTest(hooks, options); | ||
|
||
// Additional setup for rendering tests can be done here. | ||
} | ||
|
||
function setupTest( | ||
hooks: Parameters<typeof upstreamSetupApplicationTest>[0], | ||
options?: Parameters<typeof upstreamSetupApplicationTest>[1] | ||
) { | ||
upstreamSetupTest(hooks, options); | ||
|
||
// Additional setup for unit tests can be done here. | ||
} | ||
|
||
export { setupApplicationTest, setupRenderingTest, setupTest }; |
File renamed without changes.
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
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
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
File renamed without changes.
51 changes: 51 additions & 0 deletions
51
tests/fixtures/app/typescript-embroider/tests/helpers/index.ts
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { | ||
setupApplicationTest as upstreamSetupApplicationTest, | ||
setupRenderingTest as upstreamSetupRenderingTest, | ||
setupTest as upstreamSetupTest, | ||
} from 'ember-qunit'; | ||
|
||
// This file exists to provide wrappers around ember-qunit's / ember-mocha's | ||
// test setup functions. This way, you can easily extend the setup that is | ||
// needed per test type. | ||
|
||
function setupApplicationTest( | ||
hooks: Parameters<typeof upstreamSetupApplicationTest>[0], | ||
options?: Parameters<typeof upstreamSetupApplicationTest>[1] | ||
) { | ||
upstreamSetupApplicationTest(hooks, options); | ||
|
||
// Additional setup for application tests can be done here. | ||
// | ||
// For example, if you need an authenticated session for each | ||
// application test, you could do: | ||
// | ||
// hooks.beforeEach(async function () { | ||
// await authenticateSession(); // ember-simple-auth | ||
// }); | ||
// | ||
// This is also a good place to call test setup functions coming | ||
// from other addons: | ||
// | ||
// setupIntl(hooks); // ember-intl | ||
// setupMirage(hooks); // ember-cli-mirage | ||
} | ||
|
||
function setupRenderingTest( | ||
hooks: Parameters<typeof upstreamSetupApplicationTest>[0], | ||
options?: Parameters<typeof upstreamSetupApplicationTest>[1] | ||
) { | ||
upstreamSetupRenderingTest(hooks, options); | ||
|
||
// Additional setup for rendering tests can be done here. | ||
} | ||
|
||
function setupTest( | ||
hooks: Parameters<typeof upstreamSetupApplicationTest>[0], | ||
options?: Parameters<typeof upstreamSetupApplicationTest>[1] | ||
) { | ||
upstreamSetupTest(hooks, options); | ||
|
||
// Additional setup for unit tests can be done here. | ||
} | ||
|
||
export { setupApplicationTest, setupRenderingTest, setupTest }; |
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { | ||
setupApplicationTest as upstreamSetupApplicationTest, | ||
setupRenderingTest as upstreamSetupRenderingTest, | ||
setupTest as upstreamSetupTest, | ||
} from 'ember-qunit'; | ||
|
||
// This file exists to provide wrappers around ember-qunit's / ember-mocha's | ||
// test setup functions. This way, you can easily extend the setup that is | ||
// needed per test type. | ||
|
||
function setupApplicationTest( | ||
hooks: Parameters<typeof upstreamSetupApplicationTest>[0], | ||
options?: Parameters<typeof upstreamSetupApplicationTest>[1] | ||
) { | ||
upstreamSetupApplicationTest(hooks, options); | ||
|
||
// Additional setup for application tests can be done here. | ||
// | ||
// For example, if you need an authenticated session for each | ||
// application test, you could do: | ||
// | ||
// hooks.beforeEach(async function () { | ||
// await authenticateSession(); // ember-simple-auth | ||
// }); | ||
// | ||
// This is also a good place to call test setup functions coming | ||
// from other addons: | ||
// | ||
// setupIntl(hooks); // ember-intl | ||
// setupMirage(hooks); // ember-cli-mirage | ||
} | ||
|
||
function setupRenderingTest( | ||
hooks: Parameters<typeof upstreamSetupApplicationTest>[0], | ||
options?: Parameters<typeof upstreamSetupApplicationTest>[1] | ||
) { | ||
upstreamSetupRenderingTest(hooks, options); | ||
|
||
// Additional setup for rendering tests can be done here. | ||
} | ||
|
||
function setupTest( | ||
hooks: Parameters<typeof upstreamSetupApplicationTest>[0], | ||
options?: Parameters<typeof upstreamSetupApplicationTest>[1] | ||
) { | ||
upstreamSetupTest(hooks, options); | ||
|
||
// Additional setup for unit tests can be done here. | ||
} | ||
|
||
export { setupApplicationTest, setupRenderingTest, setupTest }; |