Finished testing implementation

This commit is contained in:
Christopher Sanden
2026-03-18 16:38:55 +01:00
parent c73363efb9
commit 7aad9dc34d
15 changed files with 3177 additions and 33 deletions

View File

@@ -0,0 +1,15 @@
import { render, RenderOptions } from "@testing-library/react-native"
import React, { PropsWithChildren, ReactElement } from "react"
import { AppThemeProvider } from "@/src/theme/AppThemeProvider"
function ThemeWrapper({ children }: PropsWithChildren) {
return <AppThemeProvider>{children}</AppThemeProvider>
}
export function renderWithTheme(ui: ReactElement, options?: Omit<RenderOptions, "wrapper">) {
return render(ui, {
wrapper: ThemeWrapper,
...options,
})
}