Skip to content

Commit 6c36038

Browse files
committed
moved error-handler-test to basic app
1 parent 6b9b928 commit 6c36038

7 files changed

Lines changed: 43 additions & 52 deletions

File tree

packages/ember-cli-fastboot/test/error-handler-test.js

Lines changed: 0 additions & 40 deletions
This file was deleted.

packages/ember-cli-fastboot/test/fixtures/error-handler/app/routes/application.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

packages/ember-cli-fastboot/test/fixtures/error-handler/app/templates/head.hbs

Lines changed: 0 additions & 1 deletion
This file was deleted.

test-packages/basic-app/app/router.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Router.map(function() {
1010
this.route('posts');
1111
this.route('boom');
1212
this.route('imports');
13+
this.route('error-route');
1314
this.route('async-content');
1415
this.route('echo-request-headers');
1516
this.route('return-status-code-418');
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import Route from '@ember/routing/route';
2+
import { run } from '@ember/runloop';
3+
4+
export default class ErrorRoute extends Route {
5+
6+
afterModel() {
7+
run(function() {
8+
// trigger a run loop error
9+
let fooEl = document.querySelector('.foo-bar');
10+
});
11+
}
12+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FastBoot compatible vendor file: {{model.importStatus}}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
'use strict';
2+
3+
const RSVP = require('rsvp');
4+
const request = RSVP.denodeify(require('request'));
5+
const expect = require('chai').use(require('chai-string')).expect;
6+
const { startServer, stopServer } = require('../../test-libs');
7+
8+
describe('error handler acceptance', function() {
9+
this.timeout(100000);
10+
11+
before(function() {
12+
return startServer();
13+
});
14+
15+
after(function() {
16+
return stopServer();
17+
});
18+
19+
it('visiting `/error-route` does not result in an error`', async () => {
20+
const response = await request({
21+
url: `http://localhost:45678/error-route`,
22+
headers: {
23+
'Accept': 'text/html'
24+
}
25+
});
26+
27+
expect(response.statusCode).to.equal(200);
28+
});
29+
});

0 commit comments

Comments
 (0)