webdriverio/__mocks__/browserstack-local.ts
Christian Bromann 8cb10cdd52
update setup
2023-06-13 00:05:36 +02:00

17 lines
534 B
TypeScript

import { vi } from 'vitest'
export const mockIsRunning = vi.fn().mockImplementation(() => true)
export const mockStart = vi.fn().mockImplementation((options, cb) => cb(null, null))
export const mockStop = vi.fn().mockImplementation((cb) => cb(null))
export const mockLocal = vi.fn().mockImplementation(function (this: any) {
this.isRunning = mockIsRunning
this.start = mockStart
this.stop = mockStop
})
export class Local {
public isRunning = mockIsRunning
public start = mockStart
public stop = mockStop
}