fix(core): update

This commit is contained in:
2022-06-26 20:36:22 +02:00
parent 1f80df6ec2
commit 0e11d0e760
13 changed files with 8503 additions and 9937 deletions

View File

@ -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();
});