Browse Source

context should not exist on before/after tests.

(cherry picked from commit f298d72)
babel-plugin-for-integration-tests
James Talmage 9 years ago
parent
commit
f0109e29ba
  1. 1
      lib/test.js
  2. 6
      test/hooks.js

1
lib/test.js

@ -26,7 +26,6 @@ function Test(title, fn) {
this.assertCount = 0;
this.planCount = null;
this.duration = null;
this.context = {};
// test type, can be: test, hook, eachHook
this.type = 'test';

6
test/hooks.js

@ -273,13 +273,13 @@ test('shared context', function (t) {
var runner = new Runner();
runner.addBeforeHook(function (a) {
a.is(a.context.arr, undefined);
a.context.arr = [];
a.is(a.context, undefined);
a.context = {arr: []};
a.end();
});
runner.addAfterHook(function (a) {
a.is(a.context.arr, undefined);
a.is(a.context, undefined);
a.end();
});

Loading…
Cancel
Save