UNPKG

@testwizard/commands-video

Version:

23 lines (16 loc) 640 B
'use strict'; const Commands = require('@testwizard/commands-core'); const Result = Commands.ResultForOkAndErrorCode; class FilterGrayscaleCommand extends Commands.CommandBase { constructor(testObject) { super(testObject, 'FilterGrayscale'); } async execute(levels) { if (levels === undefined) throw new Error('levels is required'); const requestObj = [levels]; const json = await this.executeCommand(requestObj); return new Result(json, 'filterGrayscale was successful', 'filterGrayscale failed'); } } module.exports = FilterGrayscaleCommand;