This repository has been archived by the owner on Dec 10, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from blimmer/add-instance-initializer-blueprint
Add instance initializer blueprint.
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
blueprints/instance-initializer-test/files/tests/unit/instance-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,28 @@ | ||
/* jshint expr:true */ | ||
import { expect } from 'chai'; | ||
import { | ||
describe, | ||
it, | ||
beforeEach | ||
} from 'mocha'; | ||
import Ember from 'ember'; | ||
import { initialize } from '<%= dasherizedPackageName %>/instance-initializers/<%= dasherizedModuleName %>'; | ||
|
||
describe('<%= classifiedModuleName %>InstanceInitializer', function() { | ||
let appInstance; | ||
|
||
beforeEach(function() { | ||
Ember.run(function() { | ||
const application = Ember.Application.create(); | ||
appInstance = application.buildInstance(); | ||
}); | ||
}); | ||
|
||
// Replace this with your real tests. | ||
it('works', function() { | ||
initialize(appInstance); | ||
|
||
// you would normally confirm the results of the initializer here | ||
expect(true).to.be.ok; | ||
}); | ||
}); |
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,3 @@ | ||
module.exports = { | ||
description: 'Generates an instance initializer unit test.' | ||
}; |