Enable file nesting for unit test files in vscode (#45329)

<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

Adds support for this type of nesting of files in the VSCode explorer.

![CleanShot 2023-01-27 at
10.52.05@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/VceFdFT9YKEsQBBXXDFJ/74cd9a65-094a-491e-aadd-d65ba63c5b9d/CleanShot%202023-01-27%20at%2010.52.05@2x.png)

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
This commit is contained in:
Tim Neutkens 2023-01-28 14:56:56 +01:00 committed by GitHub
parent 05e51ac14d
commit b8a1892e00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,5 +50,12 @@
],
// Disable TypeScript surveys.
"typescript.surveys.enabled": false
"typescript.surveys.enabled": false,
// Enable file nesting for unit test files.
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"*.ts": "$(capture).test.ts, $(capture).test.tsx",
"*.tsx": "$(capture).test.ts, $(capture).test.tsx"
}
}