Skip to content

Commit decb40e

Browse files
committed
fix: correct XDELEX command method name and test parameter
1 parent 51176de commit decb40e

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

packages/client/lib/commands/XDELEX.spec.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe("XDELEX", () => {
4848
testUtils.testAll(
4949
`XDELEX non-existing key - without policy`,
5050
async (client) => {
51-
const reply = await client.xDelex("{tag}stream-key", "0-0");
51+
const reply = await client.xDelEx("{tag}stream-key", "0-0");
5252
assert.deepEqual(reply, [STREAM_DELETION_REPLY_CODES.NOT_FOUND]);
5353
},
5454
{
@@ -65,10 +65,9 @@ describe("XDELEX", () => {
6565
field: "value",
6666
});
6767

68-
const reply = await client.xDelex(
68+
const reply = await client.xDelEx(
6969
streamKey,
7070
messageId,
71-
STREAM_DELETION_POLICY.KEEPREF
7271
);
7372
assert.deepEqual(reply, [STREAM_DELETION_REPLY_CODES.DELETED]);
7473
},
@@ -86,7 +85,7 @@ describe("XDELEX", () => {
8685
field: "value",
8786
});
8887

89-
const reply = await client.xDelex(
88+
const reply = await client.xDelEx(
9089
streamKey,
9190
messageId,
9291
STREAM_DELETION_POLICY.DELREF
@@ -112,7 +111,7 @@ describe("XDELEX", () => {
112111
// Create consumer group
113112
await client.xGroupCreate(streamKey, "testgroup", "0");
114113

115-
const reply = await client.xDelex(
114+
const reply = await client.xDelEx(
116115
streamKey,
117116
messageId,
118117
STREAM_DELETION_POLICY.ACKED
@@ -138,7 +137,7 @@ describe("XDELEX", () => {
138137
}),
139138
]);
140139

141-
const reply = await client.xDelex(
140+
const reply = await client.xDelEx(
142141
streamKey,
143142
[...messageIds, "0-0"],
144143
STREAM_DELETION_POLICY.DELREF

packages/client/lib/commands/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ export default {
943943
XDEL,
944944
xDel: XDEL,
945945
XDELEX,
946-
xDelex: XDELEX,
946+
xDelEx: XDELEX,
947947
XGROUP_CREATE,
948948
xGroupCreate: XGROUP_CREATE,
949949
XGROUP_CREATECONSUMER,

0 commit comments

Comments
 (0)