Skip to content

Commit

Permalink
Add test for sub-dep has ember-fetch when using fastboot
Browse files Browse the repository at this point in the history
  • Loading branch information
xg-wang committed Dec 3, 2018
1 parent e970738 commit 930c95d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/fastboot-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ describe('renders in fastboot build', function() {
.then(app =>
app.editPackageJSON(pkg => {
pkg.devDependencies['ember-cli-fastboot'] = '*';
// ember-fetch-adapter@0.4.0 has ember-fetch as dependency, we want to test
pkg.devDependencies['ember-fetch-adapter'] = '0.4.0';
// These 2 are in ember-fetch's package.json, symlinking to dummy won't help resolve
pkg.devDependencies['abortcontroller-polyfill'] = '*';
pkg.devDependencies['node-fetch'] = '*';
Expand All @@ -39,6 +41,12 @@ describe('renders in fastboot build', function() {
return app.stopServer();
});

it('builds into dist/ember-fetch/fetch-fastboot.js ignoring sub dependency version conflict', function() {
expect(app.filePath('dist/index.html')).to.be.a.file();
expect(app.filePath('dist/ember-fetch/fetch-fastboot.js')).to.be.a.file();
expect(app.filePath('dist/assets/dummy-fastboot.js')).to.be.a.file();
});

it('fetches in fastboot mode', function() {
return get({
url: 'http://localhost:49741/',
Expand Down

0 comments on commit 930c95d

Please sign in to comment.