Skip to content

Commit

Permalink
fix(Test): adding tests for NOVALUES option
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Zambrano committed Jan 7, 2025
1 parent 28fb557 commit 2164d81
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/functional/scan_stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,25 @@ describe("*scanStream", () => {
});
});

describe('hscanStream', () => {
it('should recognize `NOVALUES`', (done) => {
let keys = [];
const redis = new Redis();
redis.hset('object', 'foo1', 'foo1_value');
redis.hset('object', 'foo2', 'foo2_value');
redis.hset('object', 'foo3', 'foo3_value');
const stream = redis.hscanStream('object', { noValues: true });
stream.on('data', function (data) {
keys = keys.concat(data);
});
stream.on('end', () => {
expect(keys).to.eql(['foo1', 'foo2', 'foo3']);
redis.disconnect();
done();
});
});
});

describe("Cluster", () => {
it("should work in cluster mode", (done) => {
const slotTable = [
Expand Down

0 comments on commit 2164d81

Please sign in to comment.