Skip to content

Commit

Permalink
chore: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Mar 28, 2023
1 parent f8b6671 commit 7b7292f
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions test/integration/commands/set.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,7 @@ runTwinSuite('set', (command, equals) => {
})

it('should return null if NX is specified and the key already exists', async () => {
const redis = new Redis({
data: {
foo: 'bar',
},
})
const redis = new Redis()
await redis[command]('foo', 'bar')

expect(await redis[command]('foo', 1, 'NX')).toBe(null)
Expand All @@ -76,11 +72,8 @@ runTwinSuite('set', (command, equals) => {
})

it('should return previous value if GET is specified and the key already exists', async () => {
const redis = new Redis({
data: {
foo: 'bar',
},
})
const redis = new Redis()
await redis[command]('foo', 'bar')

expect(equals(await redis[command]('foo', 1, 'GET'), 'bar')).toBe(true)
redis.disconnect()
Expand Down

0 comments on commit 7b7292f

Please sign in to comment.