提交 96949bcc 编写于 作者: M Matt Bierner

Strict null supressions in tests

上级 ba569d89
......@@ -346,11 +346,11 @@ suite('WorkspaceContextService - Workspace Editing', () => {
done();
});
const workspace = { folders: [{ path: folders[0].uri.fsPath }, { path: folders[1].uri.fsPath }] };
instantiationService.get(IFileService).updateContent(testObject.getWorkspace().configuration, JSON.stringify(workspace, null, '\t'))
instantiationService.get(IFileService).updateContent(testObject.getWorkspace().configuration!, JSON.stringify(workspace, null, '\t'))
.then(() => {
fileChangeEvent.fire(new FileChangesEvent([
{
resource: testObject.getWorkspace().configuration,
resource: testObject.getWorkspace().configuration!,
type: FileChangeType.UPDATED
}
]));
......
......@@ -518,14 +518,14 @@ suite('FileService', () => {
{ resource: uri.file(testDir), options: { resolveTo: [uri.file(path.join(testDir, 'deep'))] } },
{ resource: uri.file(path.join(testDir, 'deep')) }
]).then(res => {
const r1 = res[0].stat;
const r1 = res[0].stat!;
assert.equal(r1.children!.length, 8);
const deep = utils.getByName(r1, 'deep')!;
assert.equal(deep.children!.length, 4);
const r2 = res[1].stat;
const r2 = res[1].stat!;
assert.equal(r2.children!.length, 4);
assert.equal(r2.name, 'deep');
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册