diff --git a/blueprints/util-test/mocha-rfc-232-files/__root__/__testType__/__name__-test.js b/blueprints/util-test/mocha-rfc-232-files/__root__/__testType__/__name__-test.js new file mode 100644 index 00000000000..ec6e518b2a9 --- /dev/null +++ b/blueprints/util-test/mocha-rfc-232-files/__root__/__testType__/__name__-test.js @@ -0,0 +1,11 @@ +import { expect } from 'chai'; +import { describe, it } from 'mocha'; +import <%= camelizedModuleName %> from '<%= dasherizedPackageName %>/utils/<%= dasherizedModuleName %>'; + +describe('<%= friendlyTestName %>', function() { + // Replace this with your real tests. + it('works', function() { + let result = <%= camelizedModuleName %>(); + expect(result).to.be.ok; + }); +}); diff --git a/node-tests/blueprints/util-test-test.js b/node-tests/blueprints/util-test-test.js index f1a6d7295fd..95b797c95f9 100644 --- a/node-tests/blueprints/util-test-test.js +++ b/node-tests/blueprints/util-test-test.js @@ -63,6 +63,24 @@ describe('Blueprint: util-test', function() { }); }); }); + + describe('with ember-mocha@0.14.0', function() { + beforeEach(function() { + modifyPackages([ + { name: 'ember-cli-qunit', delete: true }, + { name: 'ember-mocha', dev: true }, + ]); + generateFakePackageManifest('ember-mocha', '0.14.0'); + }); + + 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/mocha-rfc232.js') + ); + }); + }); + }); }); describe('in app - module uninification', function() { diff --git a/node-tests/fixtures/util-test/mocha-rfc232.js b/node-tests/fixtures/util-test/mocha-rfc232.js new file mode 100644 index 00000000000..655e717431e --- /dev/null +++ b/node-tests/fixtures/util-test/mocha-rfc232.js @@ -0,0 +1,11 @@ +import { expect } from 'chai'; +import { describe, it } from 'mocha'; +import fooBar from 'my-app/utils/foo-bar'; + +describe('Unit | Utility | foo-bar', function() { + // Replace this with your real tests. + it('works', function() { + let result = fooBar(); + expect(result).to.be.ok; + }); +});