diff --git a/packages/client/lib/commands/COPY.spec.ts b/packages/client/lib/commands/COPY.spec.ts index cd0c6ec9fb..5b58718b0d 100644 --- a/packages/client/lib/commands/COPY.spec.ts +++ b/packages/client/lib/commands/COPY.spec.ts @@ -23,6 +23,15 @@ describe('COPY', () => { ); }); + it('with destination DB flag set to 0', () => { + assert.deepEqual( + parseArgs(COPY, 'source', 'destination', { + DB: 0 + }), + ['COPY', 'source', 'destination', 'DB', '0'] + ); + }); + it('with replace flag', () => { assert.deepEqual( parseArgs(COPY, 'source', 'destination', { diff --git a/packages/client/lib/commands/COPY.ts b/packages/client/lib/commands/COPY.ts index f26a930264..8caa66822e 100644 --- a/packages/client/lib/commands/COPY.ts +++ b/packages/client/lib/commands/COPY.ts @@ -12,7 +12,7 @@ export default { parser.push('COPY'); parser.pushKeys([source, destination]); - if (options?.DB) { + if (options?.DB !== undefined) { parser.push('DB', options.DB.toString()); }