diff --git a/src/features/sourceGeneratedDocumentProvider.ts b/src/features/sourceGeneratedDocumentProvider.ts index 721e6dcc0..13a9e3db6 100644 --- a/src/features/sourceGeneratedDocumentProvider.ts +++ b/src/features/sourceGeneratedDocumentProvider.ts @@ -101,7 +101,7 @@ export default class SourceGeneratedDocumentProvider implements TextDocumentCont let triggerUpdate = false; if (this._uriToDocumentInfo.has(uriString)) { - // Old version of the file in the cache. Remove it, and after it's replace trigger vscode to update the file. + // Old version of the file in the cache. Remove it, and after it's replaced trigger vscode to update the file. this._documents.delete(fileInfo); this._uriToDocumentInfo.delete(uriString); triggerUpdate = true; diff --git a/test/integrationTests/definitionProvider.test.ts b/test/integrationTests/definitionProvider.test.ts index 1becac39d..3a0ba53d5 100644 --- a/test/integrationTests/definitionProvider.test.ts +++ b/test/integrationTests/definitionProvider.test.ts @@ -20,8 +20,8 @@ suite(`${CSharpDefinitionProvider.name}: ${testAssetWorkspace.description}`, () this.skip(); } - await activateCSharpExtension(); - await testAssetWorkspace.restore(); + const activation = await activateCSharpExtension(); + await testAssetWorkspace.restoreAndWait(activation); const fileName = 'definition.cs'; const projectDirectory = testAssetWorkspace.projects[0].projectDirectoryPath; @@ -41,6 +41,9 @@ suite(`${CSharpDefinitionProvider.name}: ${testAssetWorkspace.description}`, () }); test("Returns the definition from Metadata", async () => { + const omnisharpConfig = vscode.workspace.getConfiguration('omnisharp'); + await omnisharpConfig.update('enableDecompilationSupport', false, vscode.ConfigurationTarget.Global); + const definitionList = (await vscode.commands.executeCommand("vscode.executeDefinitionProvider", fileUri, new vscode.Position(10, 25))); expect(definitionList.length).to.be.equal(1); expect(definitionList[0]).to.exist;