NuclearDispersionSystem/ant-design-vue-jeecg/node_modules/tape/test/create_multiple_streams.js

32 lines
692 B
Java
Raw Normal View History

2023-09-14 14:47:11 +08:00
var tape = require('../');
tape.test('createMultipleStreams', function (tt) {
tt.plan(2);
var th = tape.createHarness();
th.createStream();
th.createStream();
var testOneComplete = false;
th('test one', function (tht) {
tht.plan(1);
setTimeout( function () {
tht.pass();
testOneComplete = true;
}, 100);
});
th('test two', function (tht) {
tht.ok(testOneComplete, 'test 1 completed before test 2');
tht.end();
});
th.onFinish(function () {
tt.equal(th._results.count, 2, 'harness test ran');
tt.equal(th._results.fail, 0, "harness test didn't fail");
});
});