Skip to content

Commit

Permalink
Merge branch 'dev' into brophdawg11/fog-of-war
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Jun 14, 2024
2 parents ca303ee + ad74d67 commit 287cb89
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions integration/root-route-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ test.describe("root route", () => {

test("Skip the Layout on subsequent client renders if Layout/ErrorBoundary throws (async)", async ({
page,
browserName,
}) => {
let oldConsoleError;
oldConsoleError = console.error;
Expand Down Expand Up @@ -275,9 +276,15 @@ test.describe("root route", () => {
expect(await app.page.$("#layout")).toBeNull();
expect(await app.getHtml("title")).toMatch("Application Error");
expect(await app.getHtml("h1")).toMatch("Application Error");
expect(await app.getHtml("pre")).toMatch(
"TypeError: Cannot read properties of null"
);
if (browserName === "chromium") {
expect(await app.getHtml("pre")).toMatch(
"TypeError: Cannot read properties of null"
);
} else {
// Other browsers don't include the error message in the stack trace so just
// ensure we get the `<pre>` rendered
expect(await app.getHtml("pre")).toMatch("color: red;");
}

console.error = oldConsoleError;
});
Expand Down Expand Up @@ -340,6 +347,7 @@ test.describe("root route", () => {

test("Skip the Layout on subsequent client renders if the Layout/DefaultErrorBoundary throws (async)", async ({
page,
browserName,
}) => {
let oldConsoleError;
oldConsoleError = console.error;
Expand Down Expand Up @@ -398,9 +406,15 @@ test.describe("root route", () => {
expect(await app.page.$("#layout")).toBeNull();
expect(await app.getHtml("title")).toMatch("Application Error");
expect(await app.getHtml("h1")).toMatch("Application Error");
expect(await app.getHtml("pre")).toMatch(
"TypeError: Cannot read properties of null"
);
if (browserName === "chromium") {
expect(await app.getHtml("pre")).toMatch(
"TypeError: Cannot read properties of null"
);
} else {
// Other browsers don't include the error message in the stack trace so just
// ensure we get the `<pre>` rendered
expect(await app.getHtml("pre")).toMatch("color: red;");
}

console.error = oldConsoleError;
});
Expand Down

0 comments on commit 287cb89

Please sign in to comment.