Skip to content

Commit d6b8646

Browse files
committed
test: test fix1
1 parent 468ecc3 commit d6b8646

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

demos/default/pages/_app.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
import { useRouter } from 'next/router'
21
import '../styles/globals.css'
32

43
function MyApp({ Component, pageProps }) {
5-
const { push } = useRouter()
6-
7-
if (typeof window !== `undefined`) {
8-
// @ts-ignore
9-
window.__navigate = push
10-
}
114
const getLayout = Component.getLayout || ((page) => page)
125

13-
return <div className="prose ml-14 mt-10 mb-20">{getLayout(<Component {...pageProps} />)}</div>
6+
return (
7+
<div className='prose ml-14 mt-10 mb-20'>
8+
{getLayout(<Component {...pageProps} />)}
9+
</div>
10+
)
1411
}
1512

1613
export default MyApp

test/index.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,10 +558,10 @@ describe('onBuild()', () => {
558558
expect(existsSync(odbHandlerFile)).toBeTruthy()
559559

560560
expect(readFileSync(handlerFile, 'utf8')).toMatch(
561-
`({ conf: config, app: "../../..", pageRoot, NextServer, staticManifest, mode: 'ssr' })`,
561+
`({ conf: config, app: "../../..", pageRoot, NextServer, staticManifest, blobManifest, mode: 'ssr' })`,
562562
)
563563
expect(readFileSync(odbHandlerFile, 'utf8')).toMatch(
564-
`({ conf: config, app: "../../..", pageRoot, NextServer, staticManifest, mode: 'odb' })`,
564+
`({ conf: config, app: "../../..", pageRoot, NextServer, staticManifest, blobManifest, mode: 'odb' })`,
565565
)
566566
expect(readFileSync(handlerFile, 'utf8')).toMatch(`require("../../../.next/required-server-files.json")`)
567567
expect(readFileSync(odbHandlerFile, 'utf8')).toMatch(`require("../../../.next/required-server-files.json")`)

0 commit comments

Comments
 (0)