1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/test/integration/basic/pages
Kyle Holmberg 72e7929242 Change page export validity check on client and server in development (#5857)
Resolves #4055 

Credit: https://github.com/zeit/next.js/pull/5095

I didn't use the ignore webpack plugin from the original PR and tested bundle size with https://github.com/zeit/next.js/pull/5339 - seems to be safe on that front.

Was able to get tests to pass locally, unsure of what goes wrong in CI 🤷‍♂️ 

**Questions**
1) The initial PR didn't include changes to `next-server/lib/router` in `getRouteInfo()`. Should the same changes be made within?

2) Should we add a test for rendering a component created via `forwardRef()`?

`component-with-forwardedRef`:
```javascript
export default React.forwardRef((props, ref) => <span {...props} forwardedRef={ref}>This is a component with a forwarded ref</span>);
```

some test:
```javascript
test('renders from forwardRef', async () => {
  const $ = await get$('/component-with-forwardedRef')
  const span = $('span')
  expect(span.text()).toMatch(/This is a component with a forwarded ref/)
})
```
2018-12-17 16:09:23 +01:00
..
dynamic Tests for "ssr: true" on dynamic pages (#5728) 2018-11-25 01:11:25 +01:00
hmr Don’t use chunkhash in development (#4436) 2018-05-23 14:37:02 +02:00
nav Use as instead of url to determine URL newness (#4153) 2018-09-03 15:26:34 +02:00
nested-cdm Fix page loader page normalization issue (#1844) 2017-05-01 16:26:18 -07:00
using-asset Improved next/asset support (#3664) 2018-02-02 21:09:24 +01:00
async-props.js Upgrade standard.js (#4064) 2018-03-27 20:11:03 +02:00
custom-encoding.js Add a charset to the default Content-Type (#3333) 2017-12-05 16:00:58 -08:00
custom-extension.jsx Add custom-server-typescript example (see #3694) (#3838) 2018-02-22 16:29:47 +01:00
default-head.js Remove dublicate className from head (followup) (#5027) 2018-08-25 10:00:57 +02:00
empty-get-initial-props.js Make sure lastAppProps always have some value. (#829) 2017-01-20 11:33:46 -08:00
error-in-the-browser-global-scope.js Remove unused vars and fix typo. (#5752) 2018-11-27 12:28:34 +01:00
error-in-the-global-scope.js Fix SSR error handling in the global scope (#3877) 2018-02-24 18:49:08 +05:30
error-inside-browser-page.js Remove unused vars and fix typo. (#5752) 2018-11-27 12:28:34 +01:00
error-inside-page.js Fix SSR error handling in the global scope (#3877) 2018-02-24 18:49:08 +05:30
exports.js Fix edge case where file had module.export in the content (#5823) 2018-12-05 14:37:26 +01:00
forwardRef-component.js Change page export validity check on client and server in development (#5857) 2018-12-17 16:09:23 +01:00
fragment-syntax.js Upgrade Babel 6 to Babel 7 (major) (#4050) 2018-04-03 09:34:07 +02:00
head.js Dedupe only items with unique key (#5800) 2018-12-03 17:28:42 +01:00
index.js Fix the page-loader-normalization issue on '/index' page. (#1882) 2017-05-04 13:05:47 -07:00
json.js Fix .json import issue (#944) 2017-02-01 15:17:15 +09:00
link.js Updated <Link> in repo, always wrapping an anchor. (#798) 2017-01-16 22:27:55 +01:00
memo-component.js Change page export validity check on client and server in development (#5857) 2018-12-17 16:09:23 +01:00
no-default-export.js Handle pages with no default export and show an error. (#1484) 2017-03-23 09:40:22 +05:30
process-env.js Remove obsolete webpack plugins (#5158) 2018-09-14 15:45:48 +02:00
read-only-object-error.js Transpile imports if module has module.exports (#5780) 2018-11-30 17:56:07 +01:00
stateless.js New test setup (#640) 2017-01-12 13:14:49 +09:00
styled-jsx.js New test setup (#640) 2017-01-12 13:14:49 +09:00
url-prop-override.js Fix url prop override (#4191) 2018-04-22 13:20:24 -07:00
url-prop.js Fix url prop override (#4191) 2018-04-22 13:20:24 -07:00
with-cdm.js Fix page loader page normalization issue (#1844) 2017-05-01 16:26:18 -07:00