UNPKG

@testwizard/commands-video

Version:

27 lines (20 loc) 912 B
'use strict'; const Commands = require('@testwizard/commands-core'); const Result = require('./FindAllPatternLocationsResult'); class FindAllPatternLocationsCommand extends Commands.CommandBase { constructor(testObject) { super(testObject, 'FindAllPatternLocations'); } async execute(filePath, mode, similarity) { if (filePath === undefined) throw new Error('filePath is required'); if (mode === undefined) throw new Error('mode is required'); if (similarity === undefined) throw new Error('similarity is required'); const requestObj = [filePath, mode, similarity]; const json = await this.executeCommand(requestObj); return new Result(json, 'FindAllPatternLocations was successful', 'FindAllPatternLocations failed'); } } module.exports = FindAllPatternLocationsCommand;