mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
This PR builds on the work from @hattakdev (PR went stale: https://github.com/vercel/next.js/pull/14499) and adds a new `integration` test for the new warning. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [x] Errors have helpful link attached, see `contributing.md`  ## To run locally 1. `pnpm build` 2. `pnpm testonly test/integration/export-getInitialProps-warn/test/index.test.js` Fixes #13946 ## Notes <details> <summary>Click to toggle see</summary> I know the `contributing.md` doc said to avoid adding new tests to `integration`. It also said new tests should be written in TypeScript. I wasn't sure where to put the tests for this so I went with `integration`. I also didn't see many other tests written in TS in this part of the codebase so I stuck with `.js`. </details> Co-authored-by: JJ Kasper <[email protected]>
6 lines
128 B
JavaScript
6 lines
128 B
JavaScript
const Page = ({ name }) => <div>{`Hello, ${name}`}</div>
|
|
|
|
Page.getInitialProps = () => ({ name: 'world' })
|
|
|
|
export default Page
|