Skip to content

Commit bbc38c7

Browse files
committed
node: add batch integration test for reset, add changelog
Signed-off-by: affonsov <67347924+affonsov@users.noreply.github.com>
1 parent 2785353 commit bbc38c7

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 2.5
2+
3+
#### Changes
4+
* Node: Add RESET command support — resets connection state (database index, client name, protocol, pubsub subscriptions); available on both standalone and cluster clients ([#5945](https://github.com/valkey-io/valkey-glide/pull/5945))
5+
16
## Pending 2.4
27

38
#### Fixes

node/tests/SharedTests.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,13 @@ export function runBaseTests(config: {
563563
await runTest(async (client: BaseClient) => {
564564
expect(await client.reset()).toEqual("RESET");
565565
expect(await client.ping()).toEqual("PONG");
566+
567+
// Batch test (non-atomic only — RESET cannot be used inside MULTI/EXEC)
568+
const batchResponse =
569+
client instanceof GlideClient
570+
? await client.exec(new Batch(false).reset(), false)
571+
: await client.exec(new ClusterBatch(false).reset(), false);
572+
expect(batchResponse?.[0]).toEqual("RESET");
566573
}, protocol);
567574
},
568575
config.timeout,

0 commit comments

Comments
 (0)