update readme

This commit is contained in:
2020-07-08 00:17:25 +00:00
parent d81a8006b1
commit aa3f1eb21f
13 changed files with 87 additions and 107 deletions

View File

@ -8,7 +8,7 @@ const test1 = tap.test('my first test -> expect true to be true', async () => {
return expect(true).to.be.true;
});
const test2 = tap.test('my second test', async tools => {
const test2 = tap.test('my second test', async (tools) => {
await tools.delayFor(50);
});
@ -21,17 +21,17 @@ const test3 = tap.test(
}
);
const test4 = tap.skip.test('my 4th test -> should fail', async tools => {
const test4 = tap.skip.test('my 4th test -> should fail', async (tools) => {
tools.allowFailure();
expect(false).to.be.true;
});
const test5 = tap.test('my 5th test -> should pass in about 500ms', async tools => {
const test5 = tap.test('my 5th test -> should pass in about 500ms', async (tools) => {
tools.timeout(1000);
await tools.delayFor(500);
});
const test6 = tap.skip.test('my 6th test -> should fail after 1000ms', async tools => {
const test6 = tap.skip.test('my 6th test -> should fail after 1000ms', async (tools) => {
tools.allowFailure();
tools.timeout(1000);
await tools.delayFor(100);

View File

@ -1,7 +1,7 @@
import { tap, expect } from '../ts/index';
import * as randomstring from 'randomstring';
const test1 = tap.test('my first test -> expect true to be true', async tools => {
const test1 = tap.test('my first test -> expect true to be true', async (tools) => {
await tools.checkIterationLeak(async () => {
const domain = randomstring.generate(1000);
});
@ -9,7 +9,7 @@ const test1 = tap.test('my first test -> expect true to be true', async tools =>
const outsideArray = [];
const test2 = tap.test('should throw', async tools => {
const test2 = tap.test('should throw', async (tools) => {
const err = await tools.returnError(async () => {
await tools.checkIterationLeak(async () => {
outsideArray.push(randomstring.generate(1000));

View File

@ -2,13 +2,13 @@ import { tap, expect } from '../ts/index';
tap.preTask('hi there', async () => {
console.log('this is a pretask');
})
});
const test1 = tap.test('my first test -> expect true to be true', async () => {
return expect(true).to.be.true;
});
const test2 = tap.test('my second test', async tools => {
const test2 = tap.test('my second test', async (tools) => {
await tools.delayFor(1000);
});
@ -21,17 +21,17 @@ const test3 = tap.test(
}
);
const test4 = tap.skip.test('my 4th test -> should fail', async tools => {
const test4 = tap.skip.test('my 4th test -> should fail', async (tools) => {
tools.allowFailure();
expect(false).to.be.true;
});
const test5 = tap.test('my 5th test -> should pass in about 500ms', async tools => {
const test5 = tap.test('my 5th test -> should pass in about 500ms', async (tools) => {
tools.timeout(1000);
await tools.delayFor(500);
});
const test6 = tap.skip.test('my 6th test -> should fail after 1000ms', async tools => {
const test6 = tap.skip.test('my 6th test -> should fail after 1000ms', async (tools) => {
tools.allowFailure();
tools.timeout(1000);
await tools.delayFor(2000);