Skip to content

Commit

Permalink
[RFC 637] Customizable test setups
Browse files Browse the repository at this point in the history
  • Loading branch information
bertdeblock committed Feb 21, 2022
1 parent 057af4b commit 88dca55
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
Empty file.
30 changes: 30 additions & 0 deletions blueprints/app/files/tests/helpers/index.js
@@ -0,0 +1,30 @@
import {
setupApplicationTest as upstreamSetupApplicationTest,
setupRenderingTest,
setupTest,
} 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, options) {
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 add:
//
// 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
}

export { setupApplicationTest, setupRenderingTest, setupTest };

0 comments on commit 88dca55

Please sign in to comment.