Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
QUnit.module(module.name, {
beforeEach() {
module.setup();
},
afterEach() {
module.teardown();
}
});
}
async function testWait() {
await wait();
}
if (hasEmberVersion(2, 10)) {
// ...
}
// https://github.com/emberjs/ember-test-helpers/blob/f07e86914f2a3823c4cb6787307f9ba2bf447e68/tests/unit/setup-context-test.js
QUnit.test('it sets up this.owner', function(this: TestContext, assert: Assert) {
const { owner } = this;
assert.ok(owner, 'owner was setup');
assert.equal(typeof owner.lookup, 'function', 'has expected lookup interface');
if (hasEmberVersion(2, 12)) {
assert.equal(typeof owner.factoryFor, 'function', 'has expected factory interface');
}
});
QUnit.test('can pauseTest to be resumed "later"', async function(this: TestContext, assert: Assert) {
const promise = this.pauseTest();
QUnit.test('it sets up this.owner', function(this: TestContext, assert: Assert) {
const { owner } = this;
assert.ok(owner, 'owner was setup');
assert.equal(typeof owner.lookup, 'function', 'has expected lookup interface');
if (hasEmberVersion(2, 12)) {
assert.equal(typeof owner.factoryFor, 'function', 'has expected factory interface');
}
});