Skip to content

Commit c2001f4

Browse files
zekthmcollina
andauthored
feat: move to tap15 (#82)
* feat: move to tap15 * feat: bump tap * fix: async * feat: no coverage check * feat: review Co-authored-by: Matteo Collina <[email protected]>
1 parent b23e1ba commit c2001f4

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

.taprc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
esm: false
21
ts: false
32
jsx: false
43
flow: false

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"redis": "docker run -p 6379:6379 --rm redis:5",
1010
"test": "npm run lint && npm run unit && npm run typescript",
1111
"typescript": "tsd",
12-
"unit": "tap test/test.js"
12+
"unit": "tap --no-check-coverage test/test.js"
1313
},
1414
"repository": {
1515
"type": "git",
@@ -36,7 +36,7 @@
3636
"proxyquire": "^2.1.3",
3737
"redis": "^3.0.2",
3838
"standard": "^16.0.0",
39-
"tap": "^14.10.7",
39+
"tap": "^15.0.2",
4040
"tsd": "^0.14.0"
4141
},
4242
"dependencies": {

test/test.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,16 @@ const test = t.test
66
const Fastify = require('fastify')
77
const fastifyRedis = require('..')
88

9-
t.beforeEach((done) => {
9+
t.beforeEach(async () => {
1010
const fastify = Fastify()
1111

1212
fastify.register(fastifyRedis, {
1313
host: '127.0.0.1'
1414
})
1515

16-
fastify.ready((err) => {
17-
t.error(err)
18-
19-
fastify.redis.flushall(() => {
20-
fastify.close()
21-
done()
22-
})
23-
})
16+
await fastify.ready()
17+
await fastify.redis.flushall()
18+
await fastify.close()
2419
})
2520

2621
test('fastify.redis should exist', (t) => {

0 commit comments

Comments
 (0)