Skip to content

Commit

Permalink
ci: run tests in same workspace as launch config
Browse files Browse the repository at this point in the history
  • Loading branch information
tekumara committed Dec 9, 2023
1 parent 6617053 commit b9f9c5f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index",
"--extensionTestsPath=${workspaceFolder}/out/test/suite",
"${workspaceRoot}/src/test/fixture"
],
"outFiles": [
Expand Down
6 changes: 4 additions & 2 deletions src/test/runTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ async function main() {

// The path to test runner
// Passed to --extensionTestsPath
const extensionTestsPath = path.resolve(__dirname, "./suite/index");
const extensionTestsPath = path.resolve(__dirname, "./suite");

const launchArgs = ["--disable-extensions"];
const testWorkspace = path.resolve(__dirname, "../../src/test/fixture");

const launchArgs = ["--disable-extensions", testWorkspace];

// Download VS Code, unzip it and run the integration test
await runTests({
Expand Down
2 changes: 1 addition & 1 deletion src/test/suite/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async function testDiagnostics(
expectedDiagnostics: vscode.Diagnostic[]
) {
const actualDiagnostics = vscode.languages.getDiagnostics(docUri);
assert.equal(actualDiagnostics.length, expectedDiagnostics.length);
assert.equal(actualDiagnostics.length, expectedDiagnostics.length, "Missing diagnostics");

expectedDiagnostics.forEach((expectedDiagnostic, i) => {
const actualDiagnostic = actualDiagnostics[i];
Expand Down

0 comments on commit b9f9c5f

Please sign in to comment.