UNPKG

systelab-components-wdio-test

Version:
20 lines (19 loc) 544 B
import os from "os"; import path from "path"; import { spawn } from "child_process"; export class TauriDriverUtility { static start() { if (!this.tauriDriver) { this.tauriDriver = spawn(path.resolve(os.homedir(), '.cargo', 'bin', 'tauri-driver'), [], { stdio: [null, process.stdout, process.stderr], cwd: 'bin/' }); } } static stop() { if (this.tauriDriver) { this.tauriDriver.kill(); this.tauriDriver = null; } } }