| 1 | import { describe, expect, it, mock } from "bun:test"; |
| 2 | import { createElement } |
| 3 | import { renderToStaticMarkup } |
| 4 | |
| 5 | // bun's module mocks are process-wide, so keep every other export the real one. |
| 6 | const navigation = await |
| 7 | mock.module("next/navigation" |
| 8 | ...navigation, |
| 9 | useRouter: () => |
| 10 | usePathname: () => |
| 11 | useSearchParams: () => |
| 12 | })); |
| 13 | |
| 14 | const { Providers } |
| 15 | const { Auth } |
| 16 | |
| 17 | describe("Auth", () |
| 18 | it("renders sign-up, whose username field needs the plugin's renderer", |
| 19 | const html = |
| 20 | createElement(Providers, null |
| 21 | ); |
| 22 | expect(html).toContain |
| 23 | }); |
| 24 | }); |