Skip to content

Instantly share code, notes, and snippets.

@nflaig
Last active May 15, 2024 16:20
Show Gist options
  • Save nflaig/49c3a4541f4e06fc9474ac51a169b0ad to your computer and use it in GitHub Desktop.
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
{
"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