Skip to content

Commit 895fd1a

Browse files
committed
chore(test): update old tests
1 parent 798cf4e commit 895fd1a

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

test/full-text.test.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
PREFIX,
88
RedisClient,
99
RedisIndex,
10-
RedisKey,
10+
RedisJSONEntity,
1111
} from "../src";
1212

1313
test("full text search", async () => {
@@ -31,9 +31,16 @@ test("full text search", async () => {
3131
"OK",
3232
).toEqual("OK");
3333

34+
const jsonKey = new RedisJSONEntity(
35+
"doc:1",
36+
Type.Object({
37+
field1: Type.String(),
38+
}),
39+
);
40+
3441
expect(
3542
await redis.send(
36-
JSON.SET(new RedisKey("doc:1", Type.Any()), "$", {
43+
JSON.SET(jsonKey, "$", {
3744
field1: "value1",
3845
}),
3946
),

test/send.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
PING,
77
RedisClient,
88
RedisCommand,
9-
RedisKey,
9+
RedisEntity,
1010
RedisSet,
1111
SADD,
1212
SCARD,
@@ -45,7 +45,7 @@ test("send", async () => {
4545

4646
expect(await redis.sendRaw(PING())).toEqual(PONG);
4747

48-
const foo = new RedisKey("foo", Type.String());
48+
const foo = new RedisEntity("foo", Type.String());
4949

5050
expect(await redis.send(SET(foo, "bar"))).toEqual(true);
5151
expect(await redis.send(GET(foo))).toEqual("bar");

0 commit comments

Comments
 (0)