refactor: get rid of turborepo
This commit is contained in:
parent
7b5e820285
commit
8a21229940
83 changed files with 209 additions and 3143 deletions
|
|
@ -1,29 +0,0 @@
|
|||
import { render } from "@testing-library/react"
|
||||
import { AppProps } from "next/app"
|
||||
import MyApp from "./_app"
|
||||
|
||||
// Mock router object with required properties
|
||||
const router = {
|
||||
basePath: "",
|
||||
pathname: "/",
|
||||
query: {},
|
||||
asPath: "/",
|
||||
}
|
||||
|
||||
describe("MyApp", () => {
|
||||
it("should render a component with page props", () => {
|
||||
const props: AppProps = {
|
||||
Component: ({ title }) => (
|
||||
<>
|
||||
<div>Test Component</div>
|
||||
<div>{title}</div>
|
||||
</>
|
||||
),
|
||||
pageProps: { title: "Test Page" },
|
||||
router: router as never, // Include mocked router object in props
|
||||
}
|
||||
const { getByText } = render(<MyApp {...props} />)
|
||||
expect(getByText("Test Component")).toBeInTheDocument()
|
||||
expect(getByText("Test Page")).toBeInTheDocument()
|
||||
})
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue