feat: login form as a client component, theme toggle
This commit is contained in:
16
test-utils/render.tsx
Normal file
16
test-utils/render.tsx
Normal file
@ -0,0 +1,16 @@
|
||||
import { render as testingLibraryRender } from "@testing-library/react";
|
||||
import { MantineProvider } from "@mantine/core";
|
||||
import { darkTheme } from "@/theme";
|
||||
import React from "react";
|
||||
|
||||
export function render(ui: React.ReactNode) {
|
||||
return testingLibraryRender(<>{ui}</>, {
|
||||
wrapper: ({ children }: { children: React.ReactNode }) => (
|
||||
<MantineProvider
|
||||
theme={darkTheme}
|
||||
env="test">
|
||||
{children}
|
||||
</MantineProvider>
|
||||
),
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user