-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use ember try to test actual ember version
- Loading branch information
Kelly Selden
committed
Jul 14, 2017
1 parent
695a33a
commit 0a0369e
Showing
6 changed files
with
28 additions
and
40 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ module.exports = { | |
}, | ||
env: { | ||
node: true, | ||
mocha: true | ||
mocha: true, | ||
es6: true | ||
} | ||
}; |
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 |
---|---|---|
@@ -1,40 +1,34 @@ | ||
'use strict'; | ||
|
||
const expect = require('chai').expect; | ||
const path = require('path'); | ||
const denodeify = require('denodeify'); | ||
const request = denodeify(require('request')); | ||
const cpr = denodeify(require('cpr')); | ||
const AddonTestApp = require('ember-cli-addon-tests').AddonTestApp; | ||
|
||
describe('Acceptance | Application', function() { | ||
this.timeout(900000); | ||
this.timeout(600000); | ||
|
||
let app; | ||
|
||
before(function() { | ||
app = new AddonTestApp(); | ||
it('works', function() { | ||
let app = new AddonTestApp(); | ||
|
||
return app.create('dummy', { | ||
fixturesPath: 'tests' | ||
}).then(() => { | ||
return Promise.all([ | ||
'config/ember-try.js', | ||
'tests' | ||
].map(p => cpr(p, path.join(app.path, p), { | ||
overwrite: true, | ||
filter(p) { | ||
return !p.startsWith(path.normalize('tests/dummy')); | ||
} | ||
}))); | ||
}).then(() => { | ||
return app.runEmberCommand( | ||
'install', | ||
`ember-cli-fastboot@${process.env.npm_package_devDependencies_ember_cli_fastboot}` | ||
'try:one', | ||
process.env.EMBER_TRY_SCENARIO, | ||
'--skip-cleanup' | ||
); | ||
}).then(() => { | ||
return app.startServer(); | ||
}); | ||
}); | ||
|
||
afterEach(function() { | ||
return app.stopServer(); | ||
}); | ||
|
||
it('works', function() { | ||
return request({ | ||
url: 'http://localhost:49741/foo/bar', | ||
headers: { 'Accept': 'text/html' } | ||
}).then(response => { | ||
expect(response.body).to.contain('foo/bar foo.bar'); | ||
}); | ||
}); | ||
}); |
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
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
{{metrics.page}} {{metrics.title}} | ||
<div id="foo-bar"> | ||
{{metrics.page}} {{metrics.title}} | ||
</div> |