-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
blueprints/initializer-test: Add RFC232 variants
- Loading branch information
Showing
3 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
blueprints/initializer-test/qunit-rfc-232-files/tests/unit/initializers/__name__-test.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,29 @@ | ||
import Application from '@ember/application'; | ||
import { run } from '@ember/runloop'; | ||
|
||
import { initialize } from '<%= dasherizedModulePrefix %>/initializers/<%= dasherizedModuleName %>'; | ||
import { module, test } from 'qunit'; | ||
import { setupTest } from 'ember-qunit'; | ||
import destroyApp from '../../helpers/destroy-app'; | ||
|
||
module('<%= friendlyTestName %>', function(hooks) { | ||
setupTest(hooks); | ||
|
||
hooks.beforeEach(function() { | ||
run(() => { | ||
this.application = Application.create(); | ||
this.application.deferReadiness(); | ||
}); | ||
}); | ||
hooks.afterEach(function() { | ||
destroyApp(this.application); | ||
}); | ||
|
||
// Replace this with your real tests. | ||
test('it works', function(assert) { | ||
initialize(this.application); | ||
|
||
// you would normally confirm the results of the initializer here | ||
assert.ok(true); | ||
}); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import Application from '@ember/application'; | ||
import { run } from '@ember/runloop'; | ||
|
||
import { initialize } from 'my-app/initializers/foo'; | ||
import { module, test } from 'qunit'; | ||
import { setupTest } from 'ember-qunit'; | ||
import destroyApp from '../../helpers/destroy-app'; | ||
|
||
module('Unit | Initializer | foo', function(hooks) { | ||
setupTest(hooks); | ||
|
||
hooks.beforeEach(function() { | ||
run(() => { | ||
this.application = Application.create(); | ||
this.application.deferReadiness(); | ||
}); | ||
}); | ||
hooks.afterEach(function() { | ||
destroyApp(this.application); | ||
}); | ||
|
||
// Replace this with your real tests. | ||
test('it works', function(assert) { | ||
initialize(this.application); | ||
|
||
// you would normally confirm the results of the initializer here | ||
assert.ok(true); | ||
}); | ||
}); |