Skip to content

Commit

Permalink
refactor: remove delay dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Sep 7, 2023
1 parent 6676234 commit 968bcb4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"c8": "latest",
"ci-publish": "latest",
"conventional-github-releaser": "latest",
"delay": "latest",
"finepack": "latest",
"git-authors-cli": "latest",
"nano-staged": "latest",
Expand Down
4 changes: 2 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const delay = require('delay')
const { setTimeout } = require('timers/promises')
const test = require('ava')

const memoizeToken = require('.')
Expand Down Expand Up @@ -56,7 +56,7 @@ test('expire time', async t => {
await fn()
t.is(cache.get(key).value, 'foo')
t.is(cache.get(key).count, 2)
await delay(100)
await setTimeout(100)
await fn()
t.is(cache.get(key).value, 'bar')
t.is(cache.get(key).count, 1)
Expand Down

0 comments on commit 968bcb4

Please sign in to comment.