1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00
This commit is contained in:
Leibale
2023-06-22 18:26:22 -04:00
parent 2b318d4100
commit 4a9d934b84
2 changed files with 37 additions and 6 deletions

View File

@@ -21,7 +21,27 @@ describe('SET', () => {
});
describe('expiration', () => {
it('with expiration', () => {
it('\'KEEPTTL\'', () => {
assert.deepEqual(
SET.transformArguments('key', 'value', {
expiration: 'KEEPTTL'
}),
['SET', 'key', 'value', 'KEEPTTL']
);
});
it('{ type: \'KEEPTTL\' }', () => {
assert.deepEqual(
SET.transformArguments('key', 'value', {
expiration: {
type: 'KEEPTTL'
}
}),
['SET', 'key', 'value', 'KEEPTTL']
);
});
it('{ type: \'EX\' }', () => {
assert.deepEqual(
SET.transformArguments('key', 'value', {
expiration: {