File tree 2 files changed +22
-2
lines changed
2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -331,11 +331,11 @@ function addVows(tests) {
331
331
// before calling the inner context. Else, just run the inner context
332
332
// synchronously.
333
333
if ( topic ) {
334
- topic . addListener ( "success" , function ( vow , ctx ) {
334
+ topic . addListener ( "success" , function ( vow , ctx , env ) {
335
335
return function ( val ) {
336
336
return run ( new ( Context ) ( vow , ctx , env ) , lastTopic ) ;
337
337
} ;
338
- } ( vow , ctx ) ) ;
338
+ } ( vow , ctx , env ) ) ;
339
339
} else {
340
340
run ( new ( Context ) ( vow , ctx , env ) , lastTopic ) ;
341
341
}
Original file line number Diff line number Diff line change @@ -237,6 +237,26 @@ vows.describe("Vows").addVows({
237
237
}
238
238
}
239
239
}
240
+ } ) . addVows ( {
241
+ "Sibling contexts" : {
242
+ "'A', with `this.foo = true`" : {
243
+ topic : function ( ) {
244
+ this . foo = true ;
245
+ return this . foo ;
246
+ } ,
247
+ "should have `this.foo` set to true" : function ( res ) {
248
+ assert . equal ( res , true ) ;
249
+ }
250
+ } ,
251
+ "'B', with nothing set" : {
252
+ topic : function ( ) {
253
+ return this . foo ;
254
+ } ,
255
+ "should have `this.foo` be undefined" : function ( res ) {
256
+ assert . isUndefined ( res ) ;
257
+ }
258
+ }
259
+ }
240
260
} ) . addVows ( {
241
261
"A 2nd test suite" : {
242
262
topic : function ( ) {
You can’t perform that action at this time.
0 commit comments