Skip to content

Instantly share code, notes, and snippets.

@yuliji
Last active May 3, 2022 00:02
Show Gist options
  • Save yuliji/35c20226a71dcb3af4c3d404693d8d43 to your computer and use it in GitHub Desktop.
Save yuliji/35c20226a71dcb3af4c3d404693d8d43 to your computer and use it in GitHub Desktop.
[child_process_execSync.js] child_process.js print stdout
import { execSync } from 'child_process';
export async function runTest(args: TestArgs) {
execSync(`echo "run e2e for ${args.page} in ${args.browser}"`, {encoding: 'utf-8', stdio: ['pipline', 'inherit', 'inherit']});
execSync(`echo "run e2e for ${args.page} in ${args.browser}"`, {encoding: 'utf-8', stdio: 'inherit'}); // use parents config of stdio
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment