fix(core): update
This commit is contained in:
10
test/test.ts
10
test/test.ts
@ -1,14 +1,14 @@
|
||||
import { expect, tap } from '@pushrocks/tapbundle';
|
||||
import * as smartcache from '../ts/index';
|
||||
import * as smartcache from '../ts/index.js';
|
||||
|
||||
let smartcacheInstance: smartcache.SmartCache;
|
||||
|
||||
tap.test('should create a valid instance of SmartCache', async () => {
|
||||
smartcacheInstance = new smartcache.SmartCache();
|
||||
expect(smartcacheInstance).to.be.instanceof(smartcache.SmartCache);
|
||||
expect(smartcacheInstance).toBeInstanceOf(smartcache.SmartCache);
|
||||
});
|
||||
|
||||
tap.test('try to get async responses', async (tools) => {
|
||||
tap.test('try to get async responses', async (toolsArg) => {
|
||||
let response1Counter = 0;
|
||||
const getResponse = async () => {
|
||||
const response = await smartcacheInstance
|
||||
@ -43,9 +43,9 @@ tap.test('try to get async responses', async (tools) => {
|
||||
await getResponse();
|
||||
await getResponse2();
|
||||
await getResponse2();
|
||||
await tools.delayFor(500);
|
||||
await toolsArg.delayFor(500);
|
||||
await getResponse();
|
||||
await tools.delayFor(2000);
|
||||
await toolsArg.delayFor(2000);
|
||||
await getResponse2();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user