1
0
Fork 0
mirror of synced 2024-07-11 01:06:04 +12:00

Basic test

This commit is contained in:
Adria Navarro 2024-03-05 16:41:49 +01:00
parent 56870bed5b
commit a4288a9dd3

View file

@ -0,0 +1,21 @@
import { generator, structures } from "../../../tests"
import RedisWrapper from "../redis"
describe("redis", () => {
const redis = new RedisWrapper(structures.db.id())
beforeAll(async () => {
await redis.init()
})
describe("store", () => {
it("a basic value can be persisted", async () => {
const key = structures.uuid()
const value = generator.word()
await redis.store(key, value)
expect(await redis.get(key)).toEqual(value)
})
})
})