1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-10 11:43:01 +03:00
Files
node-redis/packages/client/lib/commands/EVAL.spec.ts
Leibale 442a554fce WIP
2023-05-10 16:07:29 +03:00

26 lines
610 B
TypeScript

import { strict as assert } from 'assert';
import testUtils, { GLOBAL } from '../test-utils';
import EVAL from './EVAL';
describe('EVAL', () => {
it('transformArguments', () => {
assert.deepEqual(
EVAL.transformArguments('return KEYS[1] + ARGV[1]', {
keys: ['key'],
arguments: ['argument']
}),
['EVAL', 'return KEYS[1] + ARGV[1]', '1', 'key', 'argument']
);
});
testUtils.testAll('eval', async client => {
assert.equal(
await client.eval('return 1'),
1
);
}, {
client: GLOBAL.SERVERS.OPEN,
cluster: GLOBAL.CLUSTERS.OPEN
});
});