From e7e09c342159636c0d710ff66cbc654c0e65ec6d Mon Sep 17 00:00:00 2001 From: Thomas Wang Date: Mon, 3 Dec 2018 11:46:07 -0800 Subject: [PATCH] Add test for sub-dep has ember-fetch when using fastboot --- test/fastboot-test.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/fastboot-test.js b/test/fastboot-test.js index 96e5a521..01a148ab 100644 --- a/test/fastboot-test.js +++ b/test/fastboot-test.js @@ -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'] = '*'; @@ -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/',