@@ -6,27 +6,27 @@ const fastbootMiddleware = require('./../src/index');
66const fixture = require ( './helpers/fixture-path' ) ;
77const TestHTTPServer = require ( './helpers/test-http-server' ) ;
88
9- describe ( 'FastBoot' , function ( ) {
9+ describe ( 'FastBoot' , function ( ) {
1010 let server ;
1111
1212 this . timeout ( 10000 ) ;
1313
14- afterEach ( function ( ) {
14+ afterEach ( function ( ) {
1515 if ( server ) {
1616 server . stop ( ) ;
1717 server = null ;
1818 }
1919 } ) ;
2020
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 ( ) {
2323 fastbootMiddleware ( ) ;
2424 } ;
2525
2626 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 / ) ;
2727 } ) ;
2828
29- it ( 'can provide distPath as the first argument' , async function ( ) {
29+ it ( 'can provide distPath as the first argument' , async function ( ) {
3030 let middleware = fastbootMiddleware ( fixture ( 'basic-app' ) ) ;
3131 server = new TestHTTPServer ( middleware ) ;
3232 await server . start ( ) ;
@@ -35,7 +35,7 @@ describe('FastBoot', function () {
3535 expect ( html ) . to . match ( / W e l c o m e t o E m b e r / ) ;
3636 } ) ;
3737
38- it ( 'can provide distPath as an option' , async function ( ) {
38+ it ( 'can provide distPath as an option' , async function ( ) {
3939 let middleware = fastbootMiddleware ( {
4040 distPath : fixture ( 'basic-app' ) ,
4141 } ) ;
@@ -46,7 +46,7 @@ describe('FastBoot', function () {
4646 expect ( html ) . to . match ( / W e l c o m e t o E m b e r / ) ;
4747 } ) ;
4848
49- it ( 'can be provided with a custom FastBoot instance' , async function ( ) {
49+ it ( 'can be provided with a custom FastBoot instance' , async function ( ) {
5050 let fastboot = new FastBoot ( {
5151 distPath : fixture ( 'basic-app' ) ,
5252 } ) ;
@@ -62,7 +62,7 @@ describe('FastBoot', function () {
6262 expect ( html ) . to . match ( / W e l c o m e t o E m b e r / ) ;
6363 } ) ;
6464
65- it ( 'can reload the FastBoot instance' , async function ( ) {
65+ it ( 'can reload the FastBoot instance' , async function ( ) {
6666 let fastboot = new FastBoot ( {
6767 distPath : fixture ( 'basic-app' ) ,
6868 } ) ;
@@ -85,7 +85,7 @@ describe('FastBoot', function () {
8585 expect ( html ) . to . match ( / G o o d b y e f r o m E m b e r / ) ;
8686 } ) ;
8787
88- it ( 'it appends multivalue headers' , async function ( ) {
88+ it ( 'it appends multivalue headers' , async function ( ) {
8989 let middleware = fastbootMiddleware ( fixture ( 'multivalue-headers' ) ) ;
9090 server = new TestHTTPServer ( middleware ) ;
9191 await server . start ( ) ;
@@ -94,7 +94,7 @@ describe('FastBoot', function () {
9494 expect ( headers [ 'x-fastboot' ] ) . to . eq ( 'a, b, c' ) ;
9595 } ) ;
9696
97- it ( 'can pass metadata info to the app' , async function ( ) {
97+ it ( 'can pass metadata info to the app' , async function ( ) {
9898 let middleware = fastbootMiddleware ( {
9999 distPath : fixture ( 'app-with-metadata' ) ,
100100 visitOptions : {
@@ -111,7 +111,8 @@ describe('FastBoot', function () {
111111 // FIXME:
112112 // TODO:
113113 // https://github.com/ember-fastboot/ember-cli-fastboot/pull/840#issuecomment-894329631
114- xit ( 'works without metadata passed' , async function ( ) {
114+ // eslint-disable-next-line mocha/no-skipped-tests
115+ xit ( 'works without metadata passed' , async function ( ) {
115116 let middleware = fastbootMiddleware ( {
116117 distPath : fixture ( 'app-with-metadata' ) ,
117118 } ) ;
@@ -123,10 +124,10 @@ describe('FastBoot', function () {
123124 } ) ;
124125
125126 /* eslint-disable mocha/no-setup-in-describe */
126- [ true , false ] . forEach ( ( chunkedResponse ) => {
127- describe ( `when chunked response is ${ chunkedResponse ? 'enabled' : 'disabled' } ` , function ( ) {
127+ [ true , false ] . forEach ( chunkedResponse => {
128+ describe ( `when chunked response is ${ chunkedResponse ? 'enabled' : 'disabled' } ` , function ( ) {
128129 if ( chunkedResponse ) {
129- it ( 'responds with a chunked response' , async function ( ) {
130+ it ( 'responds with a chunked response' , async function ( ) {
130131 let middleware = fastbootMiddleware ( {
131132 distPath : fixture ( 'basic-app' ) ,
132133 chunkedResponse,
@@ -140,7 +141,7 @@ describe('FastBoot', function () {
140141 } ) ;
141142 }
142143
143- it ( "returns 404 when navigating to a URL that doesn't exist" , async function ( ) {
144+ it ( "returns 404 when navigating to a URL that doesn't exist" , async function ( ) {
144145 let middleware = fastbootMiddleware ( {
145146 distPath : fixture ( 'basic-app' ) ,
146147 chunkedResponse,
@@ -155,7 +156,7 @@ describe('FastBoot', function () {
155156 }
156157 } ) ;
157158
158- it ( 'returns a 500 error if an error occurs' , async function ( ) {
159+ it ( 'returns a 500 error if an error occurs' , async function ( ) {
159160 let middleware = fastbootMiddleware ( {
160161 distPath : fixture ( 'rejected-promise' ) ,
161162 chunkedResponse,
@@ -170,8 +171,8 @@ describe('FastBoot', function () {
170171 }
171172 } ) ;
172173
173- describe ( 'when resilient mode is enabled' , function ( ) {
174- it ( 'renders no FastBoot markup' , async function ( ) {
174+ describe ( 'when resilient mode is enabled' , function ( ) {
175+ it ( 'renders no FastBoot markup' , async function ( ) {
175176 let middleware = fastbootMiddleware ( {
176177 distPath : fixture ( 'rejected-promise' ) ,
177178 resilient : true ,
@@ -184,7 +185,7 @@ describe('FastBoot', function () {
184185 expect ( html ) . to . not . match ( / e r r o r / ) ;
185186 } ) ;
186187
187- it ( 'propagates to error handling middleware' , async function ( ) {
188+ it ( 'propagates to error handling middleware' , async function ( ) {
188189 let middleware = fastbootMiddleware ( {
189190 distPath : fixture ( 'rejected-promise' ) ,
190191 resilient : true ,
@@ -201,7 +202,7 @@ describe('FastBoot', function () {
201202 expect ( body ) . to . match ( / h e l l o w o r l d / ) ;
202203 } ) ;
203204
204- it ( 'is does not propagate errors when and there is no error handling middleware' , async function ( ) {
205+ it ( 'is does not propagate errors when and there is no error handling middleware' , async function ( ) {
205206 let middleware = fastbootMiddleware ( {
206207 distPath : fixture ( 'rejected-promise' ) ,
207208 resilient : true ,
@@ -219,7 +220,7 @@ describe('FastBoot', function () {
219220 expect ( body ) . to . match ( / h e l l o w o r l d / ) ;
220221 } ) ;
221222
222- it ( 'allows post-fastboot middleware to recover the response when it fails' , async function ( ) {
223+ it ( 'allows post-fastboot middleware to recover the response when it fails' , async function ( ) {
223224 let middleware = fastbootMiddleware ( {
224225 distPath : fixture ( 'rejected-promise' ) ,
225226 resilient : true ,
@@ -237,8 +238,8 @@ describe('FastBoot', function () {
237238 } ) ;
238239 } ) ;
239240
240- describe ( 'when resilient mode is disabled' , function ( ) {
241- it ( 'propagates to error handling middleware' , async function ( ) {
241+ describe ( 'when resilient mode is disabled' , function ( ) {
242+ it ( 'propagates to error handling middleware' , async function ( ) {
242243 let middleware = fastbootMiddleware ( {
243244 distPath : fixture ( 'rejected-promise' ) ,
244245 resilient : false ,
@@ -257,7 +258,7 @@ describe('FastBoot', function () {
257258 }
258259 } ) ;
259260
260- it ( 'allows post-fastboot middleware to recover the response when it fails' , async function ( ) {
261+ it ( 'allows post-fastboot middleware to recover the response when it fails' , async function ( ) {
261262 let middleware = fastbootMiddleware ( {
262263 distPath : fixture ( 'rejected-promise' ) ,
263264 resilient : false ,
0 commit comments