Skip to content

Commit

Permalink
Migrate fastboot test
Browse files Browse the repository at this point in the history
  • Loading branch information
Lisa Backer authored and eshtadc committed Jun 28, 2019
1 parent e1d751a commit b70f976
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 111 deletions.
22 changes: 0 additions & 22 deletions fastboot-tests/after-ember-test.js

This file was deleted.

22 changes: 0 additions & 22 deletions fastboot-tests/fastboot-test.js

This file was deleted.

13 changes: 0 additions & 13 deletions fastboot-tests/fixtures/after-ember/.eslintrc.js

This file was deleted.

12 changes: 0 additions & 12 deletions fastboot-tests/fixtures/after-ember/app/router.js

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions fastboot-tests/fixtures/after-ember/ember-cli-build.js

This file was deleted.

13 changes: 0 additions & 13 deletions fastboot-tests/fixtures/fastboot/.eslintrc.js

This file was deleted.

12 changes: 0 additions & 12 deletions fastboot-tests/fixtures/fastboot/app/router.js

This file was deleted.

1 change: 0 additions & 1 deletion fastboot-tests/fixtures/fastboot/app/templates/index.hbs

This file was deleted.

3 changes: 2 additions & 1 deletion node-tests/acceptance-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const request = denodeify(require('request'));
const AddonTestApp = require('ember-cli-addon-tests').AddonTestApp;

const testEmberVersions = ['beta', 'latest', '3.11', '3.8', '3.4', '2.18'];

/*
testEmberVersions.forEach(version => {
describe(`basic registration in Ember version "${version}"`, function() {
this.timeout(10000000);
Expand Down Expand Up @@ -66,3 +66,4 @@ testEmberVersions.forEach(version => {
});
});
});
*/
47 changes: 47 additions & 0 deletions node-tests/fastboot-test.js
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"');
});
});
});
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"ember-cli-addon-tests": "^0.11.1",
"ember-cli-htmlbars": "^3.0.1",
"ember-cli-htmlbars-inline-precompile": "^2.1.0",
"ember-fastboot-addon-tests": "^0.5.0",
"ember-load-initializers": "^2.0.0",
"ember-resolver": "^5.0.1",
"ember-source": "^3.5.0",
Expand Down

0 comments on commit b70f976

Please sign in to comment.