mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
Converted another ~70 test files to strictNullChecks (#65672)
* Converted another ~70 test files to strictNullChecks These are the remaining test files that didn't require any changes to non-test file types. I'll send those in separately. Most changes were automatic and small (`!`s). The only non-trival change is that `extHostSearch.ts` needs an interface for its test data. Again used [TypeStat](https://github.com/JoshuaKGoldberg/TypeStat) when possible per #65581. I'm happy to split this up into smaller PRs if you'd prefer! * Added missing `!`s to `commands.test.ts`
This commit is contained in:
committed by
Matt Bierner
parent
6b4f5991b4
commit
373b44115b
@@ -122,7 +122,7 @@ suite('ConfigurationEditingService', () => {
|
||||
if (configuraitonService) {
|
||||
configuraitonService.dispose();
|
||||
}
|
||||
instantiationService = null;
|
||||
instantiationService = null!;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ suite('ConfigurationEditingService', () => {
|
||||
} else {
|
||||
c(void 0);
|
||||
}
|
||||
}).then(() => parentDir = null);
|
||||
}).then(() => parentDir = null!);
|
||||
}
|
||||
|
||||
test('errors cases - invalid key', () => {
|
||||
@@ -178,7 +178,7 @@ suite('ConfigurationEditingService', () => {
|
||||
test('do not notify error', () => {
|
||||
instantiationService.stub(ITextFileService, 'isDirty', true);
|
||||
const target = sinon.stub();
|
||||
instantiationService.stub(INotificationService, <INotificationService>{ prompt: target, _serviceBrand: null, notify: null, error: null, info: null, warn: null });
|
||||
instantiationService.stub(INotificationService, <INotificationService>{ prompt: target, _serviceBrand: null, notify: null!, error: null!, info: null!, warn: null! });
|
||||
return testObject.writeConfiguration(ConfigurationTarget.USER, { key: 'configurationEditing.service.testSetting', value: 'value' }, { donotNotifyError: true })
|
||||
.then(() => assert.fail('Should fail with ERROR_CONFIGURATION_FILE_DIRTY error.'),
|
||||
(error: ConfigurationEditingError) => {
|
||||
|
||||
Reference in New Issue
Block a user