Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Mar 29, 2023
1 parent b4be13f commit 1eaaaf7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {

beforeEach(() => {
jest.spyOn(console, "warn").mockImplementation(() => {});
jest.spyOn(console, "error").mockImplementation(() => {});
});

describe("A <StaticRouterProvider>", () => {
Expand Down
32 changes: 20 additions & 12 deletions packages/react-router/__tests__/data-memory-router-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1761,18 +1761,20 @@ describe("createMemoryRouter", () => {
💿 Hey developer 👋
</p>
<p>
You can provide a way better UX than this when your app throws errors by providing your own 
You can provide a way better UX than this when your app throws errors by providing your own
<code
style="padding: 2px 4px; background-color: rgba(200, 200, 200, 0.5);"
>
ErrorBoundary
</code>
prop on 
or
<code
style="padding: 2px 4px; background-color: rgba(200, 200, 200, 0.5);"
>
&lt;Route&gt;
errorElement
</code>
prop on your route.
</p>
</div>"
`);
Expand Down Expand Up @@ -1878,18 +1880,20 @@ describe("createMemoryRouter", () => {
💿 Hey developer 👋
</p>
<p>
You can provide a way better UX than this when your app throws errors by providing your own 
You can provide a way better UX than this when your app throws errors by providing your own
<code
style="padding: 2px 4px; background-color: rgba(200, 200, 200, 0.5);"
>
ErrorBoundary
</code>
prop on 
or
<code
style="padding: 2px 4px; background-color: rgba(200, 200, 200, 0.5);"
>
&lt;Route&gt;
errorElement
</code>
prop on your route.
</p>
</div>"
`);
Expand Down Expand Up @@ -2110,18 +2114,20 @@ describe("createMemoryRouter", () => {
💿 Hey developer 👋
</p>
<p>
You can provide a way better UX than this when your app throws errors by providing your own 
You can provide a way better UX than this when your app throws errors by providing your own
<code
style="padding: 2px 4px; background-color: rgba(200, 200, 200, 0.5);"
>
ErrorBoundary
</code>
prop on 
or
<code
style="padding: 2px 4px; background-color: rgba(200, 200, 200, 0.5);"
>
&lt;Route&gt;
errorElement
</code>
prop on your route.
</p>
</div>"
`);
Expand Down Expand Up @@ -2294,18 +2300,20 @@ describe("createMemoryRouter", () => {
💿 Hey developer 👋
</p>
<p>
You can provide a way better UX than this when your app throws errors by providing your own 
You can provide a way better UX than this when your app throws errors by providing your own
<code
style="padding: 2px 4px; background-color: rgba(200, 200, 200, 0.5);"
>
ErrorBoundary
</code>
prop on 
or
<code
style="padding: 2px 4px; background-color: rgba(200, 200, 200, 0.5);"
>
&lt;Route&gt;
errorElement
</code>
prop on your route.
</p>
</div>
</div>"
Expand Down
3 changes: 1 addition & 2 deletions packages/react-router/lib/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,7 @@ function DefaultErrorComponent() {
<p>💿 Hey developer 👋</p>
<p>
You can provide a way better UX than this when your app throws errors
by providing your own&nbsp;
<code style={codeStyles}>ErrorBoundary</code> or{" "}
by providing your own <code style={codeStyles}>ErrorBoundary</code> or{" "}
<code style={codeStyles}>errorElement</code> prop on your route.
</p>
</>
Expand Down

0 comments on commit 1eaaaf7

Please sign in to comment.