cli,docs: update jest transform to only include source maps when requested
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -465,7 +465,7 @@ The overrides in a single `package.json` may for example look like this:
|
||||
},
|
||||
```
|
||||
|
||||
If you want to configure editor integration for tests we recommend executing the bundled configuration directly with Jest, rather than running through the Yarn test script. For example, with the Jest extension for VS Code, the configuration would look like this:
|
||||
If you want to configure editor integration for tests we recommend executing the bundled configuration directly with Jest, rather than running through the Yarn test script. For example, with the Jest extension for VS Code the configuration would look like this:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -473,6 +473,30 @@ If you want to configure editor integration for tests we recommend executing the
|
||||
}
|
||||
```
|
||||
|
||||
If you also want to enable source maps when debugging tests, you can do so by setting the `ENABLE_SOURCE_MAPS` environment variable. For example, a complete launch configuration for VS Code debugging may look like this:
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "node",
|
||||
"name": "vscode-jest-tests",
|
||||
"request": "launch",
|
||||
"console": "integratedTerminal",
|
||||
"internalConsoleOptions": "neverOpen",
|
||||
"disableOptimisticBPs": true,
|
||||
"program": "${workspaceFolder}/node_modules/.bin/jest",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {
|
||||
"ENABLE_SOURCE_MAPS": "true"
|
||||
},
|
||||
"args": [
|
||||
"--config",
|
||||
"node_modules/@backstage/cli/config/jest.js",
|
||||
"--runInBand",
|
||||
"--watchAll=false"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Publishing
|
||||
|
||||
Package publishing is an optional part of the Backstage build system and not
|
||||
|
||||
Reference in New Issue
Block a user