-
-
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.
add mocha rfc 232 service test blueprint
- Loading branch information
1 parent
acd144f
commit a384c7d
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
blueprints/service-test/mocha-rfc-232-files/__root__/__testType__/__path__/__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,13 @@ | ||
import { expect } from 'chai'; | ||
import { describe, it } from 'mocha'; | ||
import { setupTest } from 'ember-mocha'; | ||
|
||
describe('<%= friendlyTestDescription %>', function() { | ||
setupTest(); | ||
|
||
// Replace this with your real tests. | ||
it('exists', function() { | ||
let service = this.owner.lookup('service:<%= dasherizedModuleName %>'); | ||
expect(service).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 |
---|---|---|
|
@@ -80,6 +80,24 @@ describe('Blueprint: service-test', function() { | |
}); | ||
}); | ||
|
||
describe('with [email protected]', function() { | ||
beforeEach(function() { | ||
modifyPackages([ | ||
{ name: 'ember-cli-qunit', delete: true }, | ||
{ name: 'ember-mocha', dev: true }, | ||
]); | ||
generateFakePackageManifest('ember-mocha', '0.14.0'); | ||
}); | ||
|
||
it('service-test foo', function() { | ||
return emberGenerateDestroy(['service-test', 'foo'], _file => { | ||
expect(_file('tests/unit/services/foo-test.js')).to.equal( | ||
fixture('service-test/mocha-rfc232.js') | ||
); | ||
}); | ||
}); | ||
}); | ||
|
||
describe('with [email protected]', function() { | ||
beforeEach(function() { | ||
generateFakePackageManifest('ember-cli-qunit', '4.2.0'); | ||
|
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 { expect } from 'chai'; | ||
import { describe, it } from 'mocha'; | ||
import { setupTest } from 'ember-mocha'; | ||
|
||
describe('Unit | Service | foo', function() { | ||
setupTest(); | ||
|
||
// Replace this with your real tests. | ||
it('exists', function() { | ||
let service = this.owner.lookup('service:foo'); | ||
expect(service).to.be.ok; | ||
}); | ||
}); |