@samitouri / QOS-React-2 / commits / e73911e715

Clean up my "hard to read" code (#22295)

Ricky committed Sep 11, 2021 at 15:05 UTC e73911e715866df69bc6a9ae8b372cccbe8dceb1
1 file changed +3 -9
scripts/jest/jest-cli.js
+3 -9
@@ -309,17 +309,11 @@ function main() {
309 validateOptions();
310 const args = getCommandArgs();
311 const envars = getEnvars();
312 + const env = Object.entries(envars).map(([k, v]) => `${k}=${v}`);
313
314 // Print the full command we're actually running.
314 - console.log(
315 - chalk.dim(
316 - `$ ${Object.keys(envars)
317 - .map(envar => `${envar}=${envars[envar]}`)
318 - .join(' ')}`,
319 - 'node',
320 - args.join(' ')
321 - )
322 - );
315 + const command = `$ ${env.join(' ')} node ${args.join(' ')}`;
316 + console.log(chalk.dim(command));
317
318 // Print the release channel and project we're running for quick confirmation.
319 console.log(