Skip to content

Commit

Permalink
chore: include basic workspace file with jest configuration (#27008)
Browse files Browse the repository at this point in the history
The upcoming v6 of the [VSCode jest plugin](https://github.com/jest-community/vscode-jest#virtualfolders) allows us to configure our monorepo packages as virtual folders.

This makes the built-in Test Explorer work out of the box.

<img width="466" alt="image" src="https://github.com/aws/aws-cdk/assets/379814/b98b3736-4713-49d7-bec6-816f14816e73">

Using the workspace is entirely optional. It can also serve as an example configurations.
But it does give a space to add recommended/opinionated VSCode settings without compromising contributor's ability to change `.vscode/settings.json`.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
mrgrain authored Sep 5, 2023
1 parent 993ee48 commit f6a5900
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions aws-cdk.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"folders": [{ "path": "." }],
"settings": {
"jest.jestCommandLine": "node_modules/.bin/jest",
"jest.autoRun": "off",
"jest.virtualFolders": [
{ "name": "aws-cdk", "rootPath": "packages/aws-cdk" },
{ "name": "aws-cdk-lib", "rootPath": "packages/aws-cdk-lib" },
{
"name": "cli-lib-alpha",
"rootPath": "packages/@aws-cdk/cli-lib-alpha"
},
{
"name": "custom-resource-handlers",
"rootPath": "packages/@aws-cdk/custom-resource-handlers"
},
{
"name": "integ-runner",
"rootPath": "packages/@aws-cdk/integ-runner"
},
{
"name": "integ-tests-alpha",
"rootPath": "packages/@aws-cdk/integ-tests-alpha"
},
{
"name": "sdk-v2-to-v3-adapter",
"rootPath": "packages/@aws-cdk/sdk-v2-to-v3-adapter"
}
]
},
"extensions": {
"recommendations": ["dbaeumer.vscode-eslint", "Orta.vscode-jest"]
}
}

0 comments on commit f6a5900

Please sign in to comment.