rsnext/test
Dave Cardwell 07084d4819
[Experimental] Only consider files within plugins (#12943)
I have a plugin with a src folder structure following jest’s recommended practice of including a `__tests__` folder:

```
$ find src/
src/
src/document-html-props-server.ts
src/__tests__
src/__tests__/document-html-props-server.unit.ts
```

collect-plugins.ts [reads the src directory](960c18da53/packages/next/build/plugins/collect-plugins.ts (L65)) and finds:
```js
[ '__tests__', 'document-html-props-server.ts' ]
```

…which it then [converts to](960c18da53/packages/next/build/plugins/collect-plugins.ts (L76-L80)):
```js
[ '', 'document-html-props-server' ]
```

…and finally [outputs](960c18da53/packages/next/build/plugins/collect-plugins.ts (L90-L96)):
```
Next.js Plugin: {my plugin} listed invalid middleware
```

This pull request makes collect-plugins.ts only consider files, so my __tests__ directory and its contents are ignored.
2020-05-20 04:05:29 +00:00
..
.stats-app Add stats config for load tests (#11868) 2020-04-13 22:00:12 -04:00
acceptance Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
eslint-plugin-next adding no html-link lint rule to eslint-plugin (#12969) 2020-05-19 10:54:32 +02:00
integration [Experimental] Only consider files within plugins (#12943) 2020-05-20 04:05:29 +00:00
isolated Exclude cache from being deleted in dev (#9448) 2019-11-19 10:40:13 -06:00
lib Stabilize config tests (#13116) 2020-05-19 18:42:41 -04:00
unit Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
.babelrc Use preset-react's development option + enable modules transform in test env (#5081) 2018-09-03 16:41:52 +02:00
.gitignore Universal Webpack (#3578) 2018-01-30 16:44:44 +01:00
jest-environment.js Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
jest-global-setup.js Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
jest-global-teardown.js Update CI/test set up (#9499) 2019-11-25 13:19:45 -05:00
jest-setup-after-env.js Only retry tests on CI (#12998) 2020-05-17 12:10:02 -04:00
test-file.txt Add additional file serving tests (#12479) 2020-05-04 11:58:19 -05:00
tsconfig.json Update tsconfig for tests 2020-01-21 15:29:39 -06:00