Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fastboot addon tests #274

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions fastboot-tests/fixtures/fastboot/app/router.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Ember from 'ember';
import config from './config/environment';

const Router = Ember.Router.extend({
location: config.locationType,
rootURL: config.rootURL
});

Router.map(function() {
});

export default Router;
1 change: 1 addition & 0 deletions fastboot-tests/fixtures/fastboot/app/templates/index.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>ember-fastboot-addon-tests</h1>
22 changes: 22 additions & 0 deletions fastboot-tests/index-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
'use strict';

const expect = require('chai').expect;
const setupTest = require('ember-fastboot-addon-tests').setupTest;

describe('index', function() {
setupTest('fastboot'/*, options */);

it('renders', function() {
return this.visit('/')
.then(function(res) {
let $ = res.jQuery;
let response = res.response;

// add your real tests here
expect(response.statusCode).to.equal(200);
expect($('body').length).to.equal(1);
expect($('h1').text().trim()).to.equal('ember-fastboot-addon-tests');
});
});

});
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"devDependencies": {
"@ember/test-helpers": "^0.7.18",
"broccoli-asset-rev": "^2.4.5",
"chai": "^4.1.2",
"ember-cli": "~3.0.0",
"ember-cli-dependency-checker": "^2.0.0",
"ember-cli-eslint": "^4.2.1",
Expand All @@ -43,6 +44,7 @@
"ember-disable-prototype-extensions": "^1.1.2",
"ember-export-application-global": "^2.0.0",
"ember-faker": "^1.1.2",
"ember-fastboot-addon-tests": "^0.4.0",
"ember-load-initializers": "^1.0.0",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-resolver": "^4.0.0",
Expand Down
Loading