-
-
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.
Merge pull request #16899 from Dhaulagiri/br-268-acceptance
add mocha rfc 268 acceptance tests
- Loading branch information
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/acceptance-test/mocha-rfc-232-files/tests/acceptance/__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 { describe, it } from 'mocha'; | ||
import { expect } from 'chai'; | ||
import { setupApplicationTest } from 'ember-mocha'; | ||
import { visit, currentURL } from '@ember/test-helpers'; | ||
|
||
describe('<%= friendlyTestName %>', function() { | ||
setupApplicationTest(); | ||
|
||
it('can visit /<%= dasherizedModuleName %>', async function() { | ||
await visit('/<%= dasherizedModuleName %>'); | ||
expect(currentURL()).to.equal('/<%= dasherizedModuleName %>'); | ||
}); | ||
}); |
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 |
---|---|---|
|
@@ -58,6 +58,24 @@ describe('Blueprint: acceptance-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('acceptance-test foo', function() { | ||
return emberGenerateDestroy(['acceptance-test', 'foo'], _file => { | ||
expect(_file('tests/acceptance/foo-test.js')).to.equal( | ||
fixture('acceptance-test/mocha-rfc268.js') | ||
); | ||
}); | ||
}); | ||
}); | ||
}); | ||
|
||
describe('in addon', function() { | ||
|
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 { describe, it } from 'mocha'; | ||
import { expect } from 'chai'; | ||
import { setupApplicationTest } from 'ember-mocha'; | ||
import { visit, currentURL } from '@ember/test-helpers'; | ||
|
||
describe('Acceptance | foo', function() { | ||
setupApplicationTest(); | ||
|
||
it('can visit /foo', async function() { | ||
await visit('/foo'); | ||
expect(currentURL()).to.equal('/foo'); | ||
}); | ||
}); |