@@ -132,9 +132,9 @@ describe('cli', function () {
132132 } )
133133 } )
134134
135- describe ( 'db.json -m first-middleware.js -m second-middleware.js' , function ( ) {
135+ describe ( 'db.json -m first-middleware.js second-middleware.js' , function ( ) {
136136 beforeEach ( function ( done ) {
137- child = cli ( [ dbFile , '-m' , middlewareFiles . en , '-m' , middlewareFiles . jp ] )
137+ child = cli ( [ dbFile , '-m' , middlewareFiles . en , middlewareFiles . jp ] )
138138 serverReady ( PORT , done )
139139 } )
140140
@@ -184,7 +184,7 @@ describe('cli', function () {
184184 } )
185185 } )
186186
187- describe ( 'db .json --no-cors=true' , function ( ) {
187+ describe ( 'fixtures/seed .json --no-cors=true' , function ( ) {
188188 beforeEach ( function ( done ) {
189189 child = cli ( [ 'fixtures/seed.js' , '--no-cors=true' ] )
190190 serverReady ( PORT , done )
@@ -198,8 +198,8 @@ describe('cli', function () {
198198 . expect ( 200 )
199199 . end ( function ( err , res ) {
200200 if ( err ) {
201- return done ( err )
202- } else if ( 'access-control-allow-origin' in res . headers ) {
201+ done ( err )
202+ } if ( 'access-control-allow-origin' in res . headers ) {
203203 done ( new Error ( 'CORS headers were not excluded from response' ) )
204204 } else {
205205 done ( )
@@ -208,7 +208,7 @@ describe('cli', function () {
208208 } )
209209 } )
210210
211- describe ( 'db .json --no-gzip=true' , function ( ) {
211+ describe ( 'fixtures/seed .json --no-gzip=true' , function ( ) {
212212 beforeEach ( function ( done ) {
213213 child = cli ( [ 'fixtures/seed.js' , '--no-gzip=true' ] )
214214 serverReady ( PORT , done )
@@ -218,11 +218,10 @@ describe('cli', function () {
218218 var origin = 'http://example.com'
219219
220220 request . get ( '/posts' )
221- . set ( 'Origin' , origin )
222221 . expect ( 200 )
223222 . end ( function ( err , res ) {
224223 if ( err ) {
225- return done ( err )
224+ done ( err )
226225 } else if ( 'content-encoding' in res . headers ) {
227226 done ( new Error ( 'Content-Encoding is set to gzip' ) )
228227 } else {
@@ -232,30 +231,6 @@ describe('cli', function () {
232231 } )
233232 } )
234233
235- describe ( 'db.json --no-gzip=false' , function ( ) {
236- beforeEach ( function ( done ) {
237- child = cli ( [ 'fixtures/seed.js' , '--no-gzip=false' ] )
238- serverReady ( PORT , done )
239- } )
240-
241- it ( 'should set Content-Encoding to gzip' , function ( done ) {
242- var origin = 'http://example.com'
243-
244- request . get ( '/posts' )
245- . set ( 'Origin' , origin )
246- . expect ( 200 )
247- . end ( function ( err , res ) {
248- if ( err ) {
249- return done ( err )
250- } else if ( 'content-encoding' in res . headers ) {
251- done ( )
252- } else {
253- done ( new Error ( 'Content-Encoding is not set to gzip' ) )
254- }
255- } )
256- } )
257- } )
258-
259234 describe ( '--watch db.json -r routes.json' , function ( ) {
260235 beforeEach ( function ( done ) {
261236 child = cli ( [ '--watch' , dbFile , '-r' , routesFile ] )
0 commit comments