Last active
May 15, 2024 16:20
-
-
Save nflaig/49c3a4541f4e06fc9474ac51a169b0ad to your computer and use it in GitHub Desktop.
Debug Lodestar tests in currently selected file using VS code, requires https://marketplace.visualstudio.com/items?itemName=rioj7.command-variable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Test Current File", | |
"type": "node", | |
"request": "launch", | |
"program": "${workspaceFolder}/node_modules/.bin/vitest", | |
"args": [ | |
"--run", | |
"${file}", | |
"-t", | |
"${input:testName}", | |
"--pool", | |
"threads", | |
"--poolOptions.threads.singleThread" | |
], | |
"cwd": "${workspaceFolder}/${input:packageName}", | |
"console": "integratedTerminal", | |
"skipFiles": ["<node_internals>/**"] | |
} | |
], | |
"inputs": [ | |
{ | |
"id": "packageName", | |
"type": "command", | |
"command": "extension.commandvariable.transform", | |
"args": { | |
"text": "${relativeFileDirname}", | |
"find": "^(packages/[^/]+).*", | |
"replace": "$1" | |
} | |
}, | |
{ | |
"id": "testName", | |
"type": "promptString", | |
"description": "Enter the test name to run, leave empty to run all" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment