You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
33 lines
764 B
TypeScript
33 lines
764 B
TypeScript
import { strict as assert } from 'node:assert';
|
|
import testUtils, { GLOBAL } from '../test-utils';
|
|
import BGSAVE from './BGSAVE';
|
|
|
|
describe('BGSAVE', () => {
|
|
describe('transformArguments', () => {
|
|
it('simple', () => {
|
|
assert.deepEqual(
|
|
BGSAVE.transformArguments(),
|
|
['BGSAVE']
|
|
);
|
|
});
|
|
|
|
it('with SCHEDULE', () => {
|
|
assert.deepEqual(
|
|
BGSAVE.transformArguments({
|
|
SCHEDULE: true
|
|
}),
|
|
['BGSAVE', 'SCHEDULE']
|
|
);
|
|
});
|
|
});
|
|
|
|
testUtils.testWithClient('client.bgSave', async client => {
|
|
assert.equal(
|
|
typeof await client.bgSave({
|
|
SCHEDULE: true // using `SCHEDULE` to make sure it won't throw an error
|
|
}),
|
|
'string'
|
|
);
|
|
}, GLOBAL.SERVERS.OPEN);
|
|
});
|