mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
fix tests
This commit is contained in:
@@ -127,7 +127,10 @@ suite('ConfigurationEditingService', () => {
|
||||
|
||||
teardown(() => {
|
||||
clearServices();
|
||||
return clearWorkspace();
|
||||
if (workspaceDir) {
|
||||
return rimraf(workspaceDir, RimRafMode.MOVE);
|
||||
}
|
||||
return undefined;
|
||||
});
|
||||
|
||||
function clearServices(): void {
|
||||
@@ -140,16 +143,6 @@ suite('ConfigurationEditingService', () => {
|
||||
}
|
||||
}
|
||||
|
||||
function clearWorkspace(): Promise<void> {
|
||||
return new Promise<void>((c, e) => {
|
||||
if (parentDir) {
|
||||
rimraf(parentDir, RimRafMode.MOVE).then(c, c);
|
||||
} else {
|
||||
c(undefined);
|
||||
}
|
||||
}).then(() => parentDir = null!);
|
||||
}
|
||||
|
||||
test('errors cases - invalid key', () => {
|
||||
return testObject.writeConfiguration(EditableConfigurationTarget.WORKSPACE, { key: 'unknown.key', value: 'value' })
|
||||
.then(() => assert.fail('Should fail with ERROR_UNKNOWN_KEY'),
|
||||
|
||||
Reference in New Issue
Block a user