summaryrefslogtreecommitdiffstats
path: root/remote/test/puppeteer/utils/internal/util.ts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--remote/test/puppeteer/utils/internal/util.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/remote/test/puppeteer/utils/internal/util.ts b/remote/test/puppeteer/utils/internal/util.ts
new file mode 100644
index 0000000000..4ebbe8b86b
--- /dev/null
+++ b/remote/test/puppeteer/utils/internal/util.ts
@@ -0,0 +1,14 @@
+import {spawnSync} from 'child_process';
+
+export const spawnAndLog = (...args: string[]): void => {
+ const {stdout, stderr} = spawnSync(args[0]!, args.slice(1), {
+ encoding: 'utf-8',
+ shell: true,
+ });
+ if (stdout) {
+ console.log(stdout);
+ }
+ if (stderr) {
+ console.error(stderr);
+ }
+};