Skip to content

Commit

Permalink
chore: use defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Apr 11, 2023
1 parent 9a0024c commit 47430e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 21 deletions.
2 changes: 0 additions & 2 deletions jest.config.redis.js
Expand Up @@ -3,6 +3,4 @@ module.exports = {
...require('./jest.config'),
testMatch: ['**/test/integration/**/*.js'],
setupFiles: ['<rootDir>/testSetupRedis.js'],
testTimeout: 2000,
openHandlesTimeout: 500,
}
27 changes: 8 additions & 19 deletions test/integration/commands/brpoplpush.js
Expand Up @@ -3,8 +3,6 @@ import Redis from 'ioredis'
// eslint-disable-next-line import/no-relative-parent-imports
import { browserSafeDescribe, runTwinSuite } from '../../../test-utils'

const TEST_TIMEOUT = 5000

runTwinSuite('brpoplpush', (command, equals) => {
browserSafeDescribe(command)(command, () => {
const redis = new Redis()
Expand All @@ -27,13 +25,9 @@ runTwinSuite('brpoplpush', (command, equals) => {
expect(await redis.lrange('bar', 0, -1)).toEqual(['bar', 'baz'])
})

it(
'should return null if the source list does not exist',
async () => {
expect(await redis[command]('foo', 'bar', 1)).toEqual(null)
},
TEST_TIMEOUT
)
it('should return null if the source list does not exist', async () => {
expect(await redis[command]('foo', 'bar', 1)).toEqual(null)
})

// @TODO Skipped because there's a bug in our implementation
;(process.env.IS_E2E ? it : it.skip)(
Expand All @@ -43,19 +37,14 @@ runTwinSuite('brpoplpush', (command, equals) => {

expect(await redis[command]('foo', 'bar', 1)).toEqual(null)
redis.disconnect()
},
TEST_TIMEOUT
}
)

it(
'should return the item',
async () => {
await redis.rpush('foo', 'foo', 'bar')
it('should return the item', async () => {
await redis.rpush('foo', 'foo', 'bar')

expect(equals(await redis[command]('foo', 'bar', 1), 'bar')).toBe(true)
},
TEST_TIMEOUT
)
expect(equals(await redis[command]('foo', 'bar', 1), 'bar')).toBe(true)
})

// TODO Skipped because there's a bug in our implementation
;(process.env.IS_E2E ? it : it.skip)(
Expand Down

0 comments on commit 47430e0

Please sign in to comment.