Basic test
This commit is contained in:
parent
56870bed5b
commit
a4288a9dd3
|
@ -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)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
Loading…
Reference in New Issue