Skip to content

Commit

Permalink
add tests for + stream id to get last entry
Browse files Browse the repository at this point in the history
  • Loading branch information
sjpotter committed May 15, 2024
1 parent dbf8f59 commit 2fcd0b5
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions packages/client/lib/commands/XREAD.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,29 @@ describe('XREAD', () => {
);
});

it('single stream last entry', () => {
assert.deepEqual(
transformArguments({
key: 'key',
id: '+'
}),
['XREAD', 'STREAMS', 'key', '+']
);
});

it('multiple streams last entry', () => {
assert.deepEqual(
transformArguments([{
key: '1',
id: '+'
}, {
key: '2',
id: '+'
}]),
['XREAD', 'STREAMS', '1', '2', '+', '+']
);
});

it('with COUNT', () => {
assert.deepEqual(
transformArguments({
Expand Down

0 comments on commit 2fcd0b5

Please sign in to comment.