diff --git a/.vscode/launch.json b/.vscode/launch.json index 9b88bc0..7e9a8b5 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -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": [ diff --git a/src/test/runTest.ts b/src/test/runTest.ts index f25a426..90002bc 100644 --- a/src/test/runTest.ts +++ b/src/test/runTest.ts @@ -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({ diff --git a/src/test/suite/integration.test.ts b/src/test/suite/integration.test.ts index 351ed88..84c07b0 100644 --- a/src/test/suite/integration.test.ts +++ b/src/test/suite/integration.test.ts @@ -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];