@@ -6,27 +6,27 @@ const fastbootMiddleware = require('./../src/index');
6
6
const fixture = require ( './helpers/fixture-path' ) ;
7
7
const TestHTTPServer = require ( './helpers/test-http-server' ) ;
8
8
9
- describe ( 'FastBoot' , function ( ) {
9
+ describe ( 'FastBoot' , function ( ) {
10
10
let server ;
11
11
12
12
this . timeout ( 10000 ) ;
13
13
14
- afterEach ( function ( ) {
14
+ afterEach ( function ( ) {
15
15
if ( server ) {
16
16
server . stop ( ) ;
17
17
server = null ;
18
18
}
19
19
} ) ;
20
20
21
- it ( 'throws an exception if no distPath is provided' , function ( ) {
22
- let fn = function ( ) {
21
+ it ( 'throws an exception if no distPath is provided' , function ( ) {
22
+ let fn = function ( ) {
23
23
fastbootMiddleware ( ) ;
24
24
} ;
25
25
26
26
expect ( fn ) . to . throw ( / Y o u m u s t i n s t a n t i a t e F a s t B o o t w i t h a d i s t P a t h o p t i o n / ) ;
27
27
} ) ;
28
28
29
- it ( 'can provide distPath as the first argument' , async function ( ) {
29
+ it ( 'can provide distPath as the first argument' , async function ( ) {
30
30
let middleware = fastbootMiddleware ( fixture ( 'basic-app' ) ) ;
31
31
server = new TestHTTPServer ( middleware ) ;
32
32
await server . start ( ) ;
@@ -35,7 +35,7 @@ describe('FastBoot', function () {
35
35
expect ( html ) . to . match ( / W e l c o m e t o E m b e r / ) ;
36
36
} ) ;
37
37
38
- it ( 'can provide distPath as an option' , async function ( ) {
38
+ it ( 'can provide distPath as an option' , async function ( ) {
39
39
let middleware = fastbootMiddleware ( {
40
40
distPath : fixture ( 'basic-app' ) ,
41
41
} ) ;
@@ -46,7 +46,7 @@ describe('FastBoot', function () {
46
46
expect ( html ) . to . match ( / W e l c o m e t o E m b e r / ) ;
47
47
} ) ;
48
48
49
- it ( 'can be provided with a custom FastBoot instance' , async function ( ) {
49
+ it ( 'can be provided with a custom FastBoot instance' , async function ( ) {
50
50
let fastboot = new FastBoot ( {
51
51
distPath : fixture ( 'basic-app' ) ,
52
52
} ) ;
@@ -62,7 +62,7 @@ describe('FastBoot', function () {
62
62
expect ( html ) . to . match ( / W e l c o m e t o E m b e r / ) ;
63
63
} ) ;
64
64
65
- it ( 'can reload the FastBoot instance' , async function ( ) {
65
+ it ( 'can reload the FastBoot instance' , async function ( ) {
66
66
let fastboot = new FastBoot ( {
67
67
distPath : fixture ( 'basic-app' ) ,
68
68
} ) ;
@@ -85,7 +85,7 @@ describe('FastBoot', function () {
85
85
expect ( html ) . to . match ( / G o o d b y e f r o m E m b e r / ) ;
86
86
} ) ;
87
87
88
- it ( 'it appends multivalue headers' , async function ( ) {
88
+ it ( 'it appends multivalue headers' , async function ( ) {
89
89
let middleware = fastbootMiddleware ( fixture ( 'multivalue-headers' ) ) ;
90
90
server = new TestHTTPServer ( middleware ) ;
91
91
await server . start ( ) ;
@@ -94,7 +94,7 @@ describe('FastBoot', function () {
94
94
expect ( headers [ 'x-fastboot' ] ) . to . eq ( 'a, b, c' ) ;
95
95
} ) ;
96
96
97
- it ( 'can pass metadata info to the app' , async function ( ) {
97
+ it ( 'can pass metadata info to the app' , async function ( ) {
98
98
let middleware = fastbootMiddleware ( {
99
99
distPath : fixture ( 'app-with-metadata' ) ,
100
100
visitOptions : {
@@ -111,7 +111,7 @@ describe('FastBoot', function () {
111
111
// FIXME:
112
112
// TODO:
113
113
// https://github.com/ember-fastboot/ember-cli-fastboot/pull/840#issuecomment-894329631
114
- xit ( 'works without metadata passed' , async function ( ) {
114
+ it ( 'works without metadata passed' , async function ( ) {
115
115
let middleware = fastbootMiddleware ( {
116
116
distPath : fixture ( 'app-with-metadata' ) ,
117
117
} ) ;
@@ -123,10 +123,10 @@ describe('FastBoot', function () {
123
123
} ) ;
124
124
125
125
/* eslint-disable mocha/no-setup-in-describe */
126
- [ true , false ] . forEach ( ( chunkedResponse ) => {
127
- describe ( `when chunked response is ${ chunkedResponse ? 'enabled' : 'disabled' } ` , function ( ) {
126
+ [ true , false ] . forEach ( chunkedResponse => {
127
+ describe ( `when chunked response is ${ chunkedResponse ? 'enabled' : 'disabled' } ` , function ( ) {
128
128
if ( chunkedResponse ) {
129
- it ( 'responds with a chunked response' , async function ( ) {
129
+ it ( 'responds with a chunked response' , async function ( ) {
130
130
let middleware = fastbootMiddleware ( {
131
131
distPath : fixture ( 'basic-app' ) ,
132
132
chunkedResponse,
@@ -140,7 +140,7 @@ describe('FastBoot', function () {
140
140
} ) ;
141
141
}
142
142
143
- it ( "returns 404 when navigating to a URL that doesn't exist" , async function ( ) {
143
+ it ( "returns 404 when navigating to a URL that doesn't exist" , async function ( ) {
144
144
let middleware = fastbootMiddleware ( {
145
145
distPath : fixture ( 'basic-app' ) ,
146
146
chunkedResponse,
@@ -155,7 +155,7 @@ describe('FastBoot', function () {
155
155
}
156
156
} ) ;
157
157
158
- it ( 'returns a 500 error if an error occurs' , async function ( ) {
158
+ it ( 'returns a 500 error if an error occurs' , async function ( ) {
159
159
let middleware = fastbootMiddleware ( {
160
160
distPath : fixture ( 'rejected-promise' ) ,
161
161
chunkedResponse,
@@ -170,8 +170,8 @@ describe('FastBoot', function () {
170
170
}
171
171
} ) ;
172
172
173
- describe ( 'when resilient mode is enabled' , function ( ) {
174
- it ( 'renders no FastBoot markup' , async function ( ) {
173
+ describe ( 'when resilient mode is enabled' , function ( ) {
174
+ it ( 'renders no FastBoot markup' , async function ( ) {
175
175
let middleware = fastbootMiddleware ( {
176
176
distPath : fixture ( 'rejected-promise' ) ,
177
177
resilient : true ,
@@ -184,7 +184,7 @@ describe('FastBoot', function () {
184
184
expect ( html ) . to . not . match ( / e r r o r / ) ;
185
185
} ) ;
186
186
187
- it ( 'propagates to error handling middleware' , async function ( ) {
187
+ it ( 'propagates to error handling middleware' , async function ( ) {
188
188
let middleware = fastbootMiddleware ( {
189
189
distPath : fixture ( 'rejected-promise' ) ,
190
190
resilient : true ,
@@ -201,7 +201,7 @@ describe('FastBoot', function () {
201
201
expect ( body ) . to . match ( / h e l l o w o r l d / ) ;
202
202
} ) ;
203
203
204
- it ( 'is does not propagate errors when and there is no error handling middleware' , async function ( ) {
204
+ it ( 'is does not propagate errors when and there is no error handling middleware' , async function ( ) {
205
205
let middleware = fastbootMiddleware ( {
206
206
distPath : fixture ( 'rejected-promise' ) ,
207
207
resilient : true ,
@@ -219,7 +219,7 @@ describe('FastBoot', function () {
219
219
expect ( body ) . to . match ( / h e l l o w o r l d / ) ;
220
220
} ) ;
221
221
222
- it ( 'allows post-fastboot middleware to recover the response when it fails' , async function ( ) {
222
+ it ( 'allows post-fastboot middleware to recover the response when it fails' , async function ( ) {
223
223
let middleware = fastbootMiddleware ( {
224
224
distPath : fixture ( 'rejected-promise' ) ,
225
225
resilient : true ,
@@ -237,8 +237,8 @@ describe('FastBoot', function () {
237
237
} ) ;
238
238
} ) ;
239
239
240
- describe ( 'when resilient mode is disabled' , function ( ) {
241
- it ( 'propagates to error handling middleware' , async function ( ) {
240
+ describe ( 'when resilient mode is disabled' , function ( ) {
241
+ it ( 'propagates to error handling middleware' , async function ( ) {
242
242
let middleware = fastbootMiddleware ( {
243
243
distPath : fixture ( 'rejected-promise' ) ,
244
244
resilient : false ,
@@ -257,7 +257,7 @@ describe('FastBoot', function () {
257
257
}
258
258
} ) ;
259
259
260
- it ( 'allows post-fastboot middleware to recover the response when it fails' , async function ( ) {
260
+ it ( 'allows post-fastboot middleware to recover the response when it fails' , async function ( ) {
261
261
let middleware = fastbootMiddleware ( {
262
262
distPath : fixture ( 'rejected-promise' ) ,
263
263
resilient : false ,
0 commit comments