UNPKG

@testwizard/commands-video

Version:

30 lines (23 loc) 768 B
'use strict'; const ResultBase = require('@testwizard/commands-core').ResultBase; class FindAllPatternLocationsResult extends ResultBase { constructor(result, successMessage, failMessage) { super(result.errorCode == 0, successMessage, failMessage); /** * @type {Array} */ this.matches = result.matches; /** * @type {number} */ this.numberOfMatches = result.numberOfMatches; if (this.success) return; /** * @type {number} */ this.errorCode = result.errorCode; this.message = this.getMessageForErrorCode(this.message, result.errorCode); } } module.exports = FindAllPatternLocationsResult;