Basic test
This commit is contained in:
parent
56870bed5b
commit
a4288a9dd3
1 changed files with 21 additions and 0 deletions
21
packages/backend-core/src/redis/tests/redis.spec.ts
Normal file
21
packages/backend-core/src/redis/tests/redis.spec.ts
Normal 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)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
Loading…
Reference in a new issue