fix(core): update
This commit is contained in:
18
test/test.ts
18
test/test.ts
@@ -1,8 +1,20 @@
|
||||
import { expect, tap } from '@pushrocks/tapbundle';
|
||||
import { tap } from '@pushrocks/tapbundle';
|
||||
import * as smartexpect from '../ts/index';
|
||||
|
||||
tap.test('first test', async () => {
|
||||
console.log(smartexpect.standardExport);
|
||||
tap.test('sync tests', async () => {
|
||||
smartexpect.expect('hello').toBeTypeofString();
|
||||
smartexpect.expect(1).not.toBeTypeofString();
|
||||
smartexpect.expect(true).toBeTypeofBoolean();
|
||||
smartexpect.expect(true).not.toBeTypeofNumber();
|
||||
});
|
||||
|
||||
tap.test('async tests', async (toolsArg) => {
|
||||
const deferred = toolsArg.defer();
|
||||
toolsArg.delayFor(4000).then(() => {
|
||||
deferred.resolve('hello');
|
||||
});
|
||||
await smartexpect.expectAsync(deferred.promise).timeout(5000).toBeTypeofString();
|
||||
await smartexpect.expectAsync(deferred.promise).not.toBeTypeofBoolean();
|
||||
});
|
||||
|
||||
tap.start();
|
||||
|
Reference in New Issue
Block a user