(scriptProc: any, timeoutMs: number, serverHost?: string)
| 33 | } |
| 34 | |
| 35 | async function runScript(scriptProc: any, timeoutMs: number, serverHost?: string) { |
| 36 | const originalFork = cp.fork; |
| 37 | (cp as any).fork = () => scriptProc; |
| 38 | try { |
| 39 | const plugin = new ExecuteDriverPlugin('execute-driver'); |
| 40 | return await plugin.executeDriverScript( |
| 41 | async () => {}, |
| 42 | fakeDriver(serverHost), |
| 43 | 'return 1', |
| 44 | 'webdriverio', |
| 45 | timeoutMs, |
| 46 | ); |
| 47 | } finally { |
| 48 | (cp as any).fork = originalFork; |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | describe('execute driver plugin', function () { |
| 53 | it('should exist', function () { |
no test coverage detected