Skip to content

Commit

Permalink
chore: refactor tests to ensure proper clean up
Browse files Browse the repository at this point in the history
Refactor tests to ensure proper clean up, including self managed
timeouts as mocha timeout handling doesn't handle pending promises,
causing confusing knock on errors.

Update to npm-groovy-lint to fix race causing slow test and random
failures.

Reduce timeouts.

Switch spammy logging to trace level.
  • Loading branch information
stevenh committed Dec 16, 2023
1 parent adbe396 commit e38f355
Show file tree
Hide file tree
Showing 13 changed files with 3,341 additions and 2,993 deletions.
46 changes: 21 additions & 25 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,6 @@
"smartStep": true,
"skipFiles": ["<node_internals>/**"]
},
{
"type": "extensionHost",
"request": "launch",
"name": "Launch Client (FINE)",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}",
"--disable-extensions"
],
"env": {
"DEBUG": "vscode-groovy-lint,npm-groovy-lint"
},
"outFiles": ["${workspaceRoot}/client/out/**/*.js"],
"preLaunchTask": {
"type": "npm",
"script": "watch"
},
"smartStep": true,
"skipFiles": ["<node_internals>/**"]
},
{
"type": "node",
"request": "attach",
Expand All @@ -65,8 +45,24 @@
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/client/out/test/suite/index",
],
"outFiles": ["${workspaceFolder}/client/out/test/**/*.js"],
"preLaunchTask": "npm: watch",
"smartStep": true,
"skipFiles": ["<node_internals>/**"]
},
{
"name": "Run Extension Tests (Debug)",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/client/out/test/suite/index",
],
"env": {
"NPM_DEBUG": "vscode-groovy-lint,npm-groovy-lint"
"NPM_DEBUG": "vscode-groovy-lint,npm-groovy-lint",
"DEBUG": "vscode-groovy-lint"
},
"outFiles": ["${workspaceFolder}/client/out/test/**/*.js"],
"preLaunchTask": "npm: watch",
Expand All @@ -85,12 +81,12 @@
],
"compounds": [
{
"name": "Groovy Lint debug",
"name": "Launch Client + Server",
"configurations": ["Launch Client", "Attach to Server"]
},
{
"name": "Groovy Lint debug (FINE)",
"configurations": ["Launch Client (FINE)", "Attach to Server"]
}
"name": "Run Extension Tests + Server",
"configurations": ["Run Extension Tests", "Attach to Server"]
},
]
}
Loading

0 comments on commit e38f355

Please sign in to comment.