UNPKG

@testwizard/core

Version:

26 lines (18 loc) 744 B
'use strict'; const Commands = require('@testwizard/commands-core'); const Result = require('./StringCompareResult'); class StringCompareCommand extends Commands.SessionCommandBase { constructor(session) { super(session, 'StringCompare'); } async execute(string1, string2) { if (string1 === undefined) throw new Error('string1 is required'); if (string2 === undefined) throw new Error('string2 is required'); const requestObj = [string1, string2]; var json = await this.executeCommand(requestObj); return new Result(json, 'StringCompare was successful', 'StringCompare failed'); } } module.exports = StringCompareCommand;