-
-
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/util-test: Add RFC232 variants
- Loading branch information
Showing
3 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
blueprints/util-test/qunit-rfc-232-files/tests/unit/utils/__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,13 @@ | ||
import <%= camelizedModuleName %> from '<%= dasherizedModulePrefix %>/utils/<%= dasherizedModuleName %>'; | ||
import { module, test } from 'qunit'; | ||
import { setupTest } from 'ember-qunit'; | ||
|
||
module('<%= friendlyTestName %>', function(hooks) { | ||
setupTest(hooks); | ||
|
||
// Replace this with your real tests. | ||
test('it works', function(assert) { | ||
let result = <%= camelizedModuleName %>(); | ||
assert.ok(result); | ||
}); | ||
}); |
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 |
---|---|---|
|
@@ -9,6 +9,7 @@ const modifyPackages = blueprintHelpers.modifyPackages; | |
const chai = require('ember-cli-blueprint-test-helpers/chai'); | ||
const expect = chai.expect; | ||
|
||
const generateFakePackageManifest = require('../helpers/generate-fake-package-manifest'); | ||
const fixture = require('../helpers/fixture'); | ||
|
||
describe('Blueprint: util-test', function() { | ||
|
@@ -26,6 +27,19 @@ describe('Blueprint: util-test', function() { | |
}); | ||
}); | ||
|
||
describe('with [email protected]', function() { | ||
beforeEach(function() { | ||
generateFakePackageManifest('ember-cli-qunit', '4.1.1'); | ||
}); | ||
|
||
it('util-test foo-bar', function() { | ||
return emberGenerateDestroy(['util-test', 'foo-bar'], _file => { | ||
expect(_file('tests/unit/utils/foo-bar-test.js')) | ||
.to.equal(fixture('util-test/rfc232.js')); | ||
}); | ||
}); | ||
}); | ||
|
||
describe('with ember-cli-mocha', function() { | ||
beforeEach(function() { | ||
modifyPackages([ | ||
|
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 fooBar from 'my-app/utils/foo-bar'; | ||
import { module, test } from 'qunit'; | ||
import { setupTest } from 'ember-qunit'; | ||
|
||
module('Unit | Utility | foo bar', function(hooks) { | ||
setupTest(hooks); | ||
|
||
// Replace this with your real tests. | ||
test('it works', function(assert) { | ||
let result = fooBar(); | ||
assert.ok(result); | ||
}); | ||
}); |