Basic test

This commit is contained in:
Adria Navarro 2024-03-05 16:41:49 +01:00
parent 56870bed5b
commit a4288a9dd3
1 changed files with 21 additions and 0 deletions

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)
})
})
})