UNPKG

@argos-ci/util

Version:
27 lines (23 loc) 545 B
// src/metadata.ts function getMetadataPath(screenshotPath) { return screenshotPath + ".argos.json"; } // src/name.ts function getScreenshotName(name, options = {}) { let parts = [name]; if (options.viewportWidth) { parts.push(`vw-${options.viewportWidth}`); } return parts.join(" "); } // src/threshold.ts function validateThreshold(threshold) { if (threshold < 0 || threshold > 1) { throw new Error("The threshold must be between 0 and 1."); } } export { getMetadataPath, getScreenshotName, validateThreshold };