-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
26 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,7 @@ describe('basic functionality', function () { | |
let result; | ||
|
||
try { | ||
result = await execa('pnpm', ['test'], { | ||
result = await execa('pnpm', ['test:ember'], { | ||
Check failure on line 52 in tests/default.test.mjs GitHub Actions / Lint & Testtests/default.test.mjs > basic functionality > successfully runs tests
|
||
cwd: join(tmpDir.path, appName), | ||
}); | ||
} catch (err) { | ||
|
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,6 @@ | ||
export default { | ||
name: 'test-init', | ||
initialize(application) { | ||
application.__test_init = 'coming from the initializer'; | ||
}, | ||
}; |
6 changes: 6 additions & 0 deletions
6
tests/fixture/app/instance-initializers/test-instance-init.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
name: 'test-instance-initializers', | ||
initialize(instance) { | ||
instance.__instance_test_init = 'set in the instance initializer'; | ||
}, | ||
}; |
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,13 @@ | ||
import { module, test } from 'qunit'; | ||
import { getApplication } from '@ember/test-helpers'; | ||
import { setupApplicationTest } from '<%= name %>/tests/helpers'; | ||
|
||
module('Acceptance | app route', function (hooks) { | ||
setupApplicationTest(hooks); | ||
|
||
test('loaded initializers /', async function (assert) { | ||
const app = getApplication(); | ||
assert.strictEqual([...app._applicationInstances][0].__instance_test_init, 'set in the instance initializer'); | ||
assert.strictEqual(app.__test_init, 'coming from the initializer'); | ||
}); | ||
}); |