-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
49 additions
and
111 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
const expect = require('chai').expect; | ||
const denodeify = require('denodeify'); | ||
const request = denodeify(require('request')); | ||
const AddonTestApp = require('ember-cli-addon-tests').AddonTestApp; | ||
|
||
describe('Fastboot compatibility', function() { | ||
this.timeout(10000000); | ||
let app; | ||
|
||
before(function() { | ||
app = new AddonTestApp(); | ||
|
||
return app.create('dummy', { | ||
fixturesPath: 'node-tests/fixtures', | ||
skipNpm: true | ||
}) | ||
.then(() => { | ||
app.editPackageJSON(pkg => { | ||
pkg.devDependencies['ember-cli-fastboot'] = 'latest'; | ||
}); | ||
return app.run('npm', 'install'); | ||
}).then(() => { | ||
return app.startServer({ | ||
detectServerStart(output) { | ||
return output.indexOf('Serving on ') > -1; | ||
} | ||
}); | ||
}); | ||
}); | ||
|
||
after(function() { | ||
return app.stopServer(); | ||
}); | ||
|
||
it('includes renders', () => { | ||
return request({ | ||
url: 'http://localhost:49741', | ||
headers: { | ||
'Accept': 'text/html' | ||
} | ||
}).then(response => { | ||
expect(response.statusCode).to.equal(200); | ||
expect(response.body).to.contain('Congratulations, you made it!') | ||
expect(response.body).to.contain('<script src="/sw-registration.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