mirror of
https://github.com/seejohnrun/haste-server.git
synced 2025-12-16 02:25:56 +00:00
fix types and build
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import RedisDocumentStore from 'src/lib/document-stores/redis'
|
||||
import { StoreNames } from 'src/types/store-names'
|
||||
|
||||
describe('Redis document store', () => {
|
||||
let store: RedisDocumentStore
|
||||
@@ -13,7 +14,7 @@ describe('Redis document store', () => {
|
||||
it('should be able to set a key and have an expiration set', async () => {
|
||||
store = new RedisDocumentStore({
|
||||
expire: 10,
|
||||
type: 'redis',
|
||||
type: StoreNames.redis
|
||||
})
|
||||
return store.set('hello1', 'world', async () => {
|
||||
const res = await store.client?.ttl('hello1')
|
||||
@@ -24,7 +25,7 @@ describe('Redis document store', () => {
|
||||
it('should not set an expiration when told not to', async () => {
|
||||
store = new RedisDocumentStore({
|
||||
expire: 10,
|
||||
type: 'redis',
|
||||
type: StoreNames.redis
|
||||
})
|
||||
|
||||
store.set(
|
||||
@@ -34,13 +35,13 @@ describe('Redis document store', () => {
|
||||
const res = await store.client?.ttl('hello2')
|
||||
expect(res).toEqual(-1)
|
||||
},
|
||||
true,
|
||||
true
|
||||
)
|
||||
})
|
||||
|
||||
it('should not set an expiration when expiration is off', async () => {
|
||||
store = new RedisDocumentStore({
|
||||
type: 'redis',
|
||||
type: StoreNames.redis
|
||||
})
|
||||
|
||||
store.set('hello3', 'world', async () => {
|
||||
|
||||
Reference in New Issue
Block a user