Added some tests

This commit is contained in:
2021-06-23 22:30:45 +02:00
parent 24f897e907
commit 3d3d7fae48
3796 changed files with 218744 additions and 3 deletions

19
tests/node_modules/tape/test/promises/fail.js generated vendored Normal file
View File

@@ -0,0 +1,19 @@
'use strict';
var test = require('../../');
if (typeof Promise === 'function' && typeof Promise.resolve === 'function') {
test('promise', function (t) {
return new Promise(function (resolve, reject) {
reject(new Error('rejection message'));
});
});
test('after', function (t) {
t.plan(1);
t.ok(true);
});
} else {
// if promises aren't supported pass the node-tap test
console.log('skip');
}

20
tests/node_modules/tape/test/promises/subTests.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
'use strict';
var test = require('../../');
if (typeof Promise === 'function' && typeof Promise.resolve === 'function') {
test('promise', function (t) {
t.test('sub test that should fail', function (t) {
return new Promise(function (resolve, reject) {
reject(new Error('rejection message'));
});
});
t.test('sub test that should pass', function (t) {
t.plan(1);
t.ok(true);
});
});
} else {
// if promises aren't supported pass the node-tap test
console.log('skip');
}