diff --git a/client/src/test/diagnostics.test.ts b/client/src/test/diagnostics.test.ts index 3131dab..ed196a5 100644 --- a/client/src/test/diagnostics.test.ts +++ b/client/src/test/diagnostics.test.ts @@ -268,6 +268,8 @@ async function testAutofixSuggestions(docUri: vscode.Uri, expectedDiagnostics: D assert.deepEqual(actualDiagnostic.range, expectedDiagnostic.range); assert.equal(actualDiagnostic.severity, expectedDiagnostic.severity); assert.equal(actualDiagnostic.source, expectedDiagnostic.source); - assert.equal(actualDiagnostic.autofix, expectedDiagnostic.autofix); + if (expectedDiagnostic.autofix) { + assert.equal(actualDiagnostic.autofix, expectedDiagnostic.autofix); + } }); } diff --git a/client/src/test/extension.test.ts b/client/src/test/extension.test.ts index baf6f8c..6050fec 100644 --- a/client/src/test/extension.test.ts +++ b/client/src/test/extension.test.ts @@ -57,10 +57,7 @@ suite("Should execute command", () => { await activate(docUri); - const diagnostics = await commands.executeCommand( - "vscode.executeDiagnosticProvider", - docUri, - ); + const diagnostics = vscode.languages.getDiagnostics(docUri); const autofixSuggestions = diagnostics .filter((diagnostic) => diagnostic.severity === vscode.DiagnosticSeverity.Error)