We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56ea5e4 commit d65251bCopy full SHA for d65251b
src/cli.test.ts
@@ -8,8 +8,7 @@ type CommandArg = [string, string | number | boolean];
8
9
describe('cli tests', () => {
10
const execCommand = (command: string, ...args: CommandArg[]) => {
11
- const quote = (val: string) => `"${val}"`;
12
- const formattedCommand = `${command} ${args.map(([c, a]) => `${c} ${quote(String(a))}`).join(' ')}`;
+ const formattedCommand = [command, ...args.flatMap(([c, a]) => [c, String(a)])].join(' ');
13
const goExecSync = goSync(() =>
14
execSync(`node ${CLI_EXECUTABLE} ${formattedCommand}`, {
15
stdio: ['pipe', 'pipe', 'pipe'],
0 commit comments