Skip to content

Commit c03c8a3

Browse files
committed
Remove hack waiting for option changes in integration tests
1 parent 08522e5 commit c03c8a3

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

test/integrationTests/unitTests.integration.test.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jestLib.describe(`Unit Testing ${testAssetWorkspace.description}`, function () {
105105
});
106106

107107
jestLib.test('Run tests uses .runsettings', async () => {
108-
await setConfigurationAndWaitForObserver('dotnet.unitTests.runSettingsPath', '.runsettings');
108+
await vscode.workspace.getConfiguration().update('dotnet.unitTests.runSettingsPath', '.runsettings');
109109

110110
const codeLenses = await getCodeLensesAsync();
111111
jestLib.expect(codeLenses).toHaveLength(9);
@@ -150,15 +150,3 @@ async function getCodeLensesAsync(): Promise<vscode.CodeLens[]> {
150150
return a.command!.title.localeCompare(b.command!.command);
151151
});
152152
}
153-
154-
async function setConfigurationAndWaitForObserver<T>(configuration: string, value: T): Promise<void> {
155-
const changed = new Promise<void>((resolve, _) => {
156-
vscode.workspace.onDidChangeConfiguration((e) => {
157-
if (e.affectsConfiguration(configuration)) {
158-
resolve();
159-
}
160-
});
161-
});
162-
vscode.workspace.getConfiguration().update(configuration, value);
163-
await changed;
164-
}

0 commit comments

Comments
 (0)