Skip to content

Commit

Permalink
add mocha rfc 232 route blueprint
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhaulagiri committed Aug 18, 2018
1 parent acd144f commit 7d8d0ea
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { expect } from 'chai';
import { describe, it } from 'mocha';
import { setupTest } from 'ember-mocha';

describe('<%= friendlyTestDescription %>', function() {
setupTest();

it('exists', function() {
let route = this.owner.lookup('route:foo');
expect(route).to.be.ok;
});
});
18 changes: 18 additions & 0 deletions node-tests/blueprints/route-test-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,24 @@ describe('Blueprint: route-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('route-test foo', function() {
return emberGenerateDestroy(['route-test', 'foo'], _file => {
expect(_file('tests/unit/routes/foo-test.js')).to.equal(
fixture('route-test/mocha-rfc232.js')
);
});
});
});
});

describe('in addon', function() {
Expand Down
12 changes: 12 additions & 0 deletions node-tests/fixtures/route-test/mocha-rfc232.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { expect } from 'chai';
import { describe, it } from 'mocha';
import { setupTest } from 'ember-mocha';

describe('Unit | Route | foo', function() {
setupTest();

it('exists', function() {
let route = this.owner.lookup('route:foo');
expect(route).to.be.ok;
});
});

0 comments on commit 7d8d0ea

Please sign in to comment.