We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ljharb
Learn more about funding links in repositories.
Report abuse
1 parent 6417cdc commit b1c1d6aCopy full SHA for b1c1d6a
index.js
@@ -15,9 +15,14 @@ var nextTick = typeof setImmediate !== 'undefined'
15
;
16
17
exports = module.exports = (function () {
18
- var harness = createHarness();
19
- harness.createStream().pipe(createDefaultStream());
20
- return harness;
+ var harness;
+ return function () {
+ if (!harness) {
21
+ harness = createHarness();
22
+ harness.createStream().pipe(createDefaultStream());
23
+ }
24
+ return harness.apply(this, arguments);
25
+ };
26
})();
27
28
exports.createHarness = createHarness;
test/array.js
@@ -31,7 +31,7 @@ tap.test('array test', function (tt) {
31
]);
32
});
33
34
- test.stream.pipe(tc);
+ test.createStream().pipe(tc);
35
36
test('array', function (t) {
37
t.plan(5);
0 commit comments