Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Increase img ratio tolerance #77

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion amp-story/linter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ const testSingleAmpImg = (
const actualWidth = width;
const actualRatio = Math.floor(actualWidth * 100 / actualHeight) / 100;
const expectedRatio = Math.floor(expectedWidth * 100 / expectedHeight) / 100;
if (Math.abs(actualRatio - expectedRatio) > 0.01) {
if (Math.abs(actualRatio - expectedRatio) > 0.015) {
const actualString = `${actualWidth}/${actualHeight} = ${actualRatio}`;
const expectedString = `${expectedWidth}/${expectedHeight} = ${expectedRatio}`;
return FAIL(`[${src}]: actual ratio [${actualString}] does not match specified [${expectedString}]`);
Expand Down