diff --git a/pages/API/navigator/new-page/onLoad.test.js b/pages/API/navigator/new-page/onLoad.test.js index e44b8d81dd0a598309df2939ec2ccf584f8b5cd8..c84b3cf3fabcee725cf3105e9e6dc6036735097d 100644 --- a/pages/API/navigator/new-page/onLoad.test.js +++ b/pages/API/navigator/new-page/onLoad.test.js @@ -66,7 +66,10 @@ describe("onLoad", () => { height: 2140, }, }); - expect(image).toMatchImageSnapshot(); + expect(image).toMatchImageSnapshot({ + failureThreshold: 0.05, + failureThresholdType: "percent", + }); await page.waitFor("view"); }); it("showLoading", async () => { @@ -82,7 +85,10 @@ describe("onLoad", () => { height: 2140, }, }); - expect(image).toMatchImageSnapshot(); + expect(image).toMatchImageSnapshot({ + failureThreshold: 0.05, + failureThresholdType: "percent", + }); }); it("showModal", async () => { page = await program.reLaunch(INTERMEDIATE_PAGE_PATH); @@ -97,7 +103,10 @@ describe("onLoad", () => { height: 2140, }, }); - expect(image).toMatchImageSnapshot(); + expect(image).toMatchImageSnapshot({ + failureThreshold: 0.05, + failureThresholdType: "percent", + }); }); it("showActionSheet", async () => { page = await program.reLaunch(INTERMEDIATE_PAGE_PATH); @@ -112,6 +121,9 @@ describe("onLoad", () => { height: 2140, }, }); - expect(image).toMatchImageSnapshot(); + expect(image).toMatchImageSnapshot({ + failureThreshold: 0.05, + failureThresholdType: "percent", + }); }); });