rsnext/test/unit
Jiachi Liu 2407ab22b9
Treat non page file as non route under app dir (#39976)
## Bug

Adding a components folder inside a catch-all page triggers the error: "Catch-all must be the last part of the URL", having the component outside works, for example `app/[...slug]/components/*.tsx` fails but `app/components/*.tsx` works as expected.

### Fix

The reason it errors because they're treated as route and inserted into the url node tree where they shouldn't be treated in this way. Adding a helper to skip collecting and normailizing every file as route for app dir, but only do it for page files

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-08-26 20:21:53 +02:00
..
eslint-plugin-next Update polyfill for eslint no-unwanted-polyfillio rule (#33170) 2022-08-08 05:56:31 +00:00
esm-interpolate Make esm default interpolation work with jest mock (#36877) 2022-05-13 16:39:38 +00:00
fixtures Support postcss.config.cjs (#38486) 2022-07-18 14:34:29 -05:00
image-optimizer Fix experimental remotePatterns wildcard (#37137) 2022-05-25 20:25:06 +00:00
isolated Ensure ENOENT error is not ignored when loading pages (#37486) 2022-06-06 14:35:26 -04:00
web-runtime Fix next/server being required during build (#39310) 2022-08-03 20:18:35 -05:00
accept-headers.test.ts Implement Middleware RFC (#30081) 2021-10-20 17:52:11 +00:00
babel-plugin-next-page-config.test.ts Babel & next-swc: Fix exporting page config with AsExpression (#32702) 2022-02-05 21:15:49 +00:00
babel-plugin-next-ssg-transform.test.ts Include submodules in exported type definition (#28316) 2021-11-26 14:46:56 +01:00
cli.test.ts feat(cli): allow configuration of http-server's timeout configuration (#35827) 2022-06-26 13:26:51 +02:00
example.txt Add util for generating new tests/error documents (#33001) 2022-01-06 09:45:04 -06:00
find-config.test.ts Support postcss.config.cjs (#38486) 2022-07-18 14:34:29 -05:00
find-page-file.test.ts Treat non page file as non route under app dir (#39976) 2022-08-26 20:21:53 +02:00
get-node-options-without-inspect.test.ts Move unit tests to one folder and migrate them to TypeScript (#28427) 2021-08-24 07:52:45 -05:00
get-project-dir.test.ts fix(next): dev server starting when importing a file using get-projec… (#38274) 2022-08-07 17:31:30 +00:00
getDisplayName.test.ts Move unit tests to one folder and migrate them to TypeScript (#28427) 2021-08-24 07:52:45 -05:00
htmlescape.test.ts Move unit tests to one folder and migrate them to TypeScript (#28427) 2021-08-24 07:52:45 -05:00
image-rendering.test.ts should render the correct sizes passed when a noscript is rendered (#37161) 2022-05-24 19:25:05 +00:00
is-equal-node.unit.test.ts correctly assess node equality when nonce attribute is present (#27573) 2021-11-10 19:31:32 -06:00
is-serializable-props.test.ts Move unit tests to one folder and migrate them to TypeScript (#28427) 2021-08-24 07:52:45 -05:00
jest-next-swc.test.ts Ensure mjs files are transformed with jest (#34698) 2022-03-09 13:49:58 +01:00
link-rendering.test.ts Update repo to use react 18 by default (#35888) 2022-04-05 21:51:47 +00:00
link-warnings.test.tsx Update repo to use react 18 by default (#35888) 2022-04-05 21:51:47 +00:00
loadGetInitialProps.test.ts Move unit tests to one folder and migrate them to TypeScript (#28427) 2021-08-24 07:52:45 -05:00
mitt.test.ts Move unit tests to one folder and migrate them to TypeScript (#28427) 2021-08-24 07:52:45 -05:00
next-babel-loader-dev.test.ts Update loader-utils (#30743) 2021-11-02 16:13:15 +01:00
next-babel-loader-prod.test.ts refactor(build): no force transpile optional chaining / nullish (#35976) 2022-04-15 21:48:43 -05:00
next-babel.test.ts Move unit tests to one folder and migrate them to TypeScript (#28427) 2021-08-24 07:52:45 -05:00
next-dynamic.test.tsx Move unit tests to one folder and migrate them to TypeScript (#28427) 2021-08-24 07:52:45 -05:00
next-head-rendering.test.ts Move unit tests to one folder and migrate them to TypeScript (#28427) 2021-08-24 07:52:45 -05:00
next-server-utils.test.ts Move unit tests to one folder and migrate them to TypeScript (#28427) 2021-08-24 07:52:45 -05:00
next-swc.test.ts feat(next-swc): Update swc crates (#35395) 2022-03-30 15:13:40 -07:00
oxford-comma.test.ts Move unit tests to one folder and migrate them to TypeScript (#28427) 2021-08-24 07:52:45 -05:00
page-route-sorter.test.ts Revert "fix the dynamic routing of middleware" (#35932) 2022-04-06 14:35:52 +00:00
parse-page-runtime.test.ts Rename page runtime edge to experimental-edge (#38041) 2022-06-26 20:02:24 -05:00
parse-relative-url.test.ts fix(#33081): handle relative path correctly (#36823) 2022-05-22 16:43:48 +00:00
phaseConstants.test.ts Move unit tests to one folder and migrate them to TypeScript (#28427) 2021-08-24 07:52:45 -05:00
recursive-copy.test.ts Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
recursive-delete.test.ts Add initial standalone build handling (#31003) 2021-11-09 11:03:20 -06:00
recursive-readdir.test.ts Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
router-add-base-path.test.ts Extract router utils to common functions (#37313) 2022-05-30 20:19:37 +02:00
split-cookies-string.test.ts Allow custom path for preview mode cookies (#38313) 2022-08-07 20:45:30 -05:00
webpack-config-overrides.test.ts Update to leverage turbo for build/prepublish (#37280) 2022-05-30 19:05:27 -05:00
write-app-declarations.test.ts Move styled-jsx type reference (#37964) 2022-06-23 19:26:08 +00:00