Context of `parallel`?
amilajack opened this issue · 6 comments
amilajack commented
parallel
seems to have an unusual context. For example:
// test.js
parallel('Some test', function () {
this.slow(2000)
})
would return:
Cannot read property 'slow' of undefined
It seems as if the context of parallel is not the function.
danielstjules commented
Somewhat related to #5 (comment) This may not be a problem in the latest mocha, so I'll need to test if a solution is available to this issue :)
amilajack commented
Maybe test cases should be added to check for this. What do you think?
danielstjules commented
Fixed by #17 :)
danielstjules commented
Fixed and published in 0.13!
amilajack commented
Great! I'll try testing this out.
thgreasi commented
Should we open a new issue for properly supporting all the context assigned props, or should we re-open this one (since the issue title is covering a wider range of things to support)?
Eg:
describe('a', function() {
before(function() {
this.x = 1;
});
parallel('b', function() {
before(function() {
this.x = 2;
});
it('c', function() {
console.log(this.x); // undefined
});
});
});