Skip to content

Commit

Permalink
chore: init redis client before each test
Browse files Browse the repository at this point in the history
Signed-off-by: mateonunez <[email protected]>
  • Loading branch information
mateonunez committed Nov 10, 2023
1 parent 69c94d1 commit 447be8a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/base.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const { describe, test, before, after } = require('node:test')
const { describe, test, beforeEach, afterEach } = require('node:test')
const assert = require('node:assert')
const { tspl } = require('@matteo.collina/tspl')
const Redis = require('ioredis')
Expand All @@ -20,11 +20,11 @@ const dummyStorage = {
}

let redisClient
before(async (t) => {
beforeEach(async () => {
redisClient = new Redis()
})

after(async (t) => {
afterEach(async () => {
await redisClient.quit()
})

Expand Down

0 comments on commit 447be8a

Please sign in to comment.