@@ -148,7 +148,8 @@ tap.test('createServer:', t => {
148
148
const app = args [ 0 ]
149
149
150
150
app . on ( 'after-export' , ( info ) => {
151
- t . equal ( Object . keys ( info ) . length , 15 , '# of keys' )
151
+ t . equal ( Object . keys ( info ) . length , 16 , '# of keys' )
152
+ t . equal ( info . method , 'POST' , 'method' )
152
153
t . type ( info . id , 'string' , 'id' )
153
154
t . equal ( info . port , args [ 3 ] . port , 'port' )
154
155
t . equal ( info . pending , 0 , 'pending' )
@@ -179,7 +180,7 @@ tap.test('createServer:', t => {
179
180
180
181
t . test ( 'on invalid route' , t => {
181
182
_boot ( [ ] , ( args ) => {
182
- wrapApp ( t , args , [ 4 , 404 , 'invalid route' ] )
183
+ wrapApp ( t , args , [ 5 , 404 , 'invalid route' ] )
183
184
184
185
_post ( 'not-gonna-work' , body0 ( ) , ( err , res , body ) => {
185
186
if ( err ) t . fail ( )
@@ -193,7 +194,7 @@ tap.test('createServer:', t => {
193
194
const opts = opts0 ( )
194
195
195
196
_boot ( [ false , false , false , opts ] , ( args ) => {
196
- wrapApp ( t , args , [ 4 , 504 , 'window for given route does not exist' ] )
197
+ wrapApp ( t , args , [ 5 , 504 , 'window for given route does not exist' ] )
197
198
198
199
_post ( '' , body0 ( ) , ( err , res , body ) => {
199
200
if ( err ) t . fail ( )
@@ -208,7 +209,7 @@ tap.test('createServer:', t => {
208
209
BrowserWindow . getAllWindows = ( ) => ( { length : Infinity } )
209
210
210
211
_boot ( [ false , BrowserWindow ] , ( args ) => {
211
- wrapApp ( t , args , [ 4 , 402 , 'too many windows are opened' ] )
212
+ wrapApp ( t , args , [ 5 , 402 , 'too many windows are opened' ] )
212
213
213
214
_post ( '' , body0 ( ) , ( err , res , body ) => {
214
215
if ( err ) t . fail ( )
@@ -220,7 +221,7 @@ tap.test('createServer:', t => {
220
221
221
222
t . test ( 'on json parse errors' , t => {
222
223
_boot ( [ ] , ( args ) => {
223
- wrapApp ( t , args , [ 4 , 422 , 'json parse error' ] )
224
+ wrapApp ( t , args , [ 5 , 422 , 'json parse error' ] )
224
225
225
226
_post ( '' , body0 ( ) + '/' , ( err , res , body ) => {
226
227
if ( err ) t . fail ( )
@@ -236,7 +237,7 @@ tap.test('createServer:', t => {
236
237
sinon . stub ( _module , 'parse' ) . yields ( 432 )
237
238
238
239
_boot ( [ false , false , false , opts ] , ( args ) => {
239
- wrapApp ( t , args , [ 4 , 432 , '' ] )
240
+ wrapApp ( t , args , [ 5 , 432 , '' ] )
240
241
241
242
_post ( '' , body0 ( ) , ( err , res , body ) => {
242
243
if ( err ) t . fail ( )
@@ -251,7 +252,7 @@ tap.test('createServer:', t => {
251
252
const opts = mockWebContents ( opts0 ( ) , 467 , { msg : 'error msg' } )
252
253
253
254
_boot ( [ false , false , false , opts ] , ( args ) => {
254
- wrapApp ( t , args , [ 11 , 467 , 'error msg' ] )
255
+ wrapApp ( t , args , [ 12 , 467 , 'error msg' ] )
255
256
256
257
_post ( '' , body0 ( ) , ( err , res , body ) => {
257
258
if ( err ) t . fail ( )
@@ -267,7 +268,7 @@ tap.test('createServer:', t => {
267
268
sinon . stub ( _module , 'convert' ) . yields ( 483 )
268
269
269
270
_boot ( [ false , false , false , opts ] , ( args ) => {
270
- wrapApp ( t , args , [ 12 , 483 , '' ] )
271
+ wrapApp ( t , args , [ 13 , 483 , '' ] )
271
272
272
273
_post ( '' , body0 ( ) , ( err , res , body ) => {
273
274
if ( err ) t . fail ( )
0 commit comments