UNPKG

@testwizard/core

Version:

23 lines (16 loc) 620 B
'use strict'; const Commands = require('@testwizard/commands-core'); const Result = require('./EndStepResult'); class EndStepCommand extends Commands.SessionCommandBase { constructor(session) { super(session, 'EndStep'); } async execute(result, message) { if(result === undefined) throw new Error('result is required'); const requestObj = [result, message]; var json = await this.executeCommand(requestObj); return new Result(json, 'EndStep was successful', 'EndStep failed'); } } module.exports = EndStepCommand;