UNPKG

@testwizard/core

Version:

22 lines (16 loc) 664 B
'use strict'; const Commands = require('@testwizard/commands-core'); const Result = Commands.ResultForOkAndErrorCodeAndMessage; class WaitForCommandCompletionCommand extends Commands.SessionCommandBase { constructor(session) { super(session, 'WaitForCommandCompletion'); } async execute(timeout) { const requestObj = timeout === undefined ? [] : [timeout]; const json = await this.executeCommand(requestObj); return new Result(json, 'waitForCommandCompletion was successful', 'waitForCommandCompletion failed'); } } module.exports = WaitForCommandCompletionCommand;