fix(core): update

This commit is contained in:
2020-02-03 20:08:57 +00:00
parent b5667be823
commit 51c1759961
9 changed files with 201 additions and 150 deletions

View File

@ -13,7 +13,7 @@ tap.test('try to get async responses', async () => {
const getResponse = async () => {
const response = await smartcacheInstance
.cacheReturn(async () => {
console.log('function ran');
console.log('function 1 ran');
return 'hello';
}, 1000)
.catch(err => {
@ -27,7 +27,7 @@ tap.test('try to get async responses', async () => {
const response = await smartcacheInstance
.cacheReturn(async () => {
console.log('function 2 ran');
return 'hello';
return 'hello there!';
}, 1000)
.catch(err => {
console.log(err);
@ -36,13 +36,13 @@ tap.test('try to get async responses', async () => {
console.log(response);
};
getResponse();
getResponse();
getResponse2();
getResponse2();
await smartdelay.delayFor(1000).then(async () => {
await getResponse();
await getResponse();
await getResponse2();
await getResponse2();
await smartdelay.delayFor(2000).then(async () => {
await getResponse();
// getResponse2();
await getResponse2();
});
});