Skip to content

Commit 50077aa

Browse files
Yurii RashkovskiiAlexis Sellier
Yurii Rashkovskii
authored and
Alexis Sellier
committed
Pass suite reference to batches
1 parent 213d6cd commit 50077aa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/vows/suite.js

+3
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ this.Suite.prototype = new(function () {
107107
tests = batch.tests,
108108
promise = batch.promise = new(events.EventEmitter);
109109

110+
var that = this;
111+
110112
batch.status = 'begin';
111113

112114
// The test runner, it calls itself recursively, passing the
@@ -169,6 +171,7 @@ this.Suite.prototype = new(function () {
169171
// Create a new evaluation context,
170172
// inheriting from the parent one.
171173
var env = Object.create(ctx.env);
174+
env.suite = that;
172175

173176
// Holds the current test or context
174177
var vow = Object.create({

0 commit comments

Comments
 (0)