UNPKG

@testwizard/core

Version:

22 lines (15 loc) 617 B
'use strict'; const Commands = require('@testwizard/commands-core'); class AddCustomDataCommand extends Commands.SessionCommandBase { constructor(session) { super(session, 'AddCustomData'); } async execute(key, value) { if (key === undefined) throw new Error('key is required'); const requestObj = [key, value]; var json = await this.executeCommand(requestObj); return new Commands.ResultForOkAndErrorCodeAndMessage(json, 'AddCustomData was successful', 'AddCustomData failed'); } } module.exports = AddCustomDataCommand;