Skip to content

Commit b1c1d6a

Browse files
author
James Halliday
committedMay 2, 2013
fix default harness going off unexpectedly
1 parent 6417cdc commit b1c1d6a

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed
 

‎index.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,14 @@ var nextTick = typeof setImmediate !== 'undefined'
1515
;
1616

1717
exports = module.exports = (function () {
18-
var harness = createHarness();
19-
harness.createStream().pipe(createDefaultStream());
20-
return harness;
18+
var harness;
19+
return function () {
20+
if (!harness) {
21+
harness = createHarness();
22+
harness.createStream().pipe(createDefaultStream());
23+
}
24+
return harness.apply(this, arguments);
25+
};
2126
})();
2227

2328
exports.createHarness = createHarness;

‎test/array.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ tap.test('array test', function (tt) {
3131
]);
3232
});
3333

34-
test.stream.pipe(tc);
34+
test.createStream().pipe(tc);
3535

3636
test('array', function (t) {
3737
t.plan(5);

0 commit comments

Comments
 (0)
Please sign in to comment.