Small tolerance by default
This commit is contained in:
+2
-2
@@ -184,7 +184,7 @@ async function copyActualToExpected(entry) {
|
|||||||
async function renderEach(page, entries, options) {
|
async function renderEach(page, entries, options) {
|
||||||
let fail = false;
|
let fail = false;
|
||||||
for (const entry of entries) {
|
for (const entry of entries) {
|
||||||
const {tolerance = 0, message = ''} = await renderPage(page, entry, options);
|
const {tolerance = 0.001, message = ''} = await renderPage(page, entry, options);
|
||||||
|
|
||||||
if (options.fix) {
|
if (options.fix) {
|
||||||
await copyActualToExpected(entry);
|
await copyActualToExpected(entry);
|
||||||
@@ -204,7 +204,7 @@ async function renderEach(page, entries, options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mismatch > tolerance) {
|
if (mismatch > tolerance) {
|
||||||
options.log.error(`${detail}': mismatch ${mismatch.toFixed(3)}`);
|
options.log.error(`${detail}': mismatch ${mismatch}`);
|
||||||
fail = true;
|
fail = true;
|
||||||
} else {
|
} else {
|
||||||
options.log.info(`${detail}': ok`);
|
options.log.info(`${detail}': ok`);
|
||||||
|
|||||||
Reference in New Issue
Block a user