Skip to content

Commit

Permalink
Enable file nesting for unit test files in vscode (#45329)
Browse files Browse the repository at this point in the history
<!--
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
[email protected]](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/VceFdFT9YKEsQBBXXDFJ/74cd9a65-094a-491e-aadd-d65ba63c5b9d/CleanShot%202023-01-27%20at%[email protected])

## 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)
  • Loading branch information
timneutkens authored Jan 28, 2023
1 parent 05e51ac commit b8a1892
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit b8a1892

Please sign in to comment.