Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ugh
  • Loading branch information
aslilac committed Dec 13, 2023
commit c7f26ad767367e49d4de5eff99153c3018b7dd2b
10 changes: 5 additions & 5 deletions site/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ export const AppProviders: FC<AppProvidersProps> = ({
<QueryClientProvider client={queryClient}>
<AuthProvider>
<ThemeProviders>
<ErrorBoundary>
{children}
<GlobalSnackbar />
</ErrorBoundary>
{children}
<GlobalSnackbar />
</ThemeProviders>
</AuthProvider>
</QueryClientProvider>
Expand All @@ -45,7 +43,9 @@ export const AppProviders: FC<AppProvidersProps> = ({
export const App: FC = () => {
return (
<AppProviders>
<AppRouter />
<ErrorBoundary>
<AppRouter />
</ErrorBoundary>
</AppProviders>
);
};
5 changes: 3 additions & 2 deletions site/src/pages/LoginPage/LoginPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import { LoginPage } from "./LoginPage";

describe("LoginPage", () => {
beforeEach(() => {
// appear logged out
server.use(
// Appear logged out
rest.get("/api/v2/users/me", (req, res, ctx) => {
return res(ctx.status(401), ctx.json({ message: "no user here" }));
}),
Expand Down Expand Up @@ -50,7 +50,8 @@ describe("LoginPage", () => {
it("redirects to the setup page if there is no first user", async () => {
// Given
server.use(
rest.get("/api/v2/users/first", async (req, res, ctx) => {
// No first user
rest.get("/api/v2/users/first", (req, res, ctx) => {
return res(ctx.status(404));
}),
);
Expand Down