MCPcopy Create free account
hub / github.com/appium/appium / runScript

Function runScript

packages/execute-driver-plugin/test/unit/plugin.spec.ts:35–50  ·  view source on GitHub ↗
(scriptProc: any, timeoutMs: number, serverHost?: string)

Source from the content-addressed store, hash-verified

33}
34
35async 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
52describe('execute driver plugin', function () {
53 it('should exist', function () {

Callers 1

plugin.spec.tsFile · 0.70

Calls 1

fakeDriverFunction · 0.70

Tested by

no test coverage detected