Fix a bunch of strict issues (#11857)

* fix a bunch of strict issues

* fix tests

* fix tests
This commit is contained in:
Anthony Dresser
2020-08-19 10:37:30 -07:00
committed by GitHub
parent e90341b3d2
commit 60c62c0668
20 changed files with 100 additions and 79 deletions

View File

@@ -20,7 +20,7 @@ class TestView extends Disposable implements IView {
this._onDidLayout.fire({ height, width });
}
private _size: number;
private _size: number = 0;
public get size(): number {
return this._size;
}
@@ -135,7 +135,7 @@ suite('ScrollableView', () => {
assert.equal(view1.size, 100, 'view1 is minimum size');
assert.equal(view2.size, 100, 'view2 is minimum size');
assert.equal(view3.size, undefined, 'view3 should not have been layout yet');
assert.equal(view3.size, 0, 'view3 should not have been layout yet');
});
test('reacts to changes in views', async () => {
@@ -157,7 +157,7 @@ suite('ScrollableView', () => {
assert.equal(view1.size, 130, 'view1 should be 130');
assert.equal(view2.size, 100, 'view2 should still be minimum size');
assert.equal(view3.size, undefined, 'view3 should not have been layout yet');
assert.equal(view3.size, 0, 'view3 should not have been layout yet');
});
test('programmatically scrolls', async () => {
@@ -174,7 +174,7 @@ suite('ScrollableView', () => {
assert.equal(view1.size, 100, 'view1 is minimum size');
assert.equal(view2.size, 100, 'view2 is minimum size');
assert.equal(view3.size, undefined, 'view3 should not have been layout yet');
assert.equal(view3.size, 0, 'view3 should not have been layout yet');
assert.equal(getViewChildren(container).length, 2, 'only 2 views are rendered');
scrollableView.setScrollTop(100);