import { vi } from 'vitest'import repl from 'node:repl'import { ReplConfig } from '../../packages/wdio-repl/src'export default class WDIORepl {static introMessage = 'some intro from mock'private _config: ReplConfigprivate _isCommandRunning = falseprivate _replServer: repl.REPLServer | undefinedprivate _evalFn: (...args: [any]) => anyprivate _startFn: (...args: [any]) => anyconstructor(config: ReplConfig) {this._config = Object.assign({commandTimeout: 5000,eval: this.eval.bind(this),prompt: '\u203A ',useGlobal: true,useColor: true}, config)this._isCommandRunning = falsethis._evalFn = vi.fn()this._startFn = vi.fn().mockImplementation(() => new Promise((resolve) => setTimeout(() => resolve(this), 100)))}eval(...args: [any]) {this._evalFn(...args)}start(...args: [any]) {return this._startFn(...args)}}