Skip to content

Commit

Permalink
Filter deprecation logs from integration tests assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Mar 21, 2023
1 parent ca0edff commit b72bc8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion integration/action-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ test.describe("actions", () => {

test.beforeEach(({ page }) => {
page.on("console", (msg) => {
logs.push(msg.text());
let text = msg.text();
if (!/DEPRECATED.*imagesizes.*imagesrcset/.test(text)) {
logs.push(text);
}
});
});

Expand Down
3 changes: 2 additions & 1 deletion integration/defer-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,8 @@ function monitorConsole(page: Page) {
let arg0 = await args[0].jsonValue();
if (
typeof arg0 === "string" &&
arg0.includes("Download the React DevTools")
(arg0.includes("Download the React DevTools") ||
/DEPRECATED.*imagesizes.*imagesrcset/.test(arg0))
) {
continue;
}
Expand Down

0 comments on commit b72bc8c

Please sign in to comment.