Skip to content

Commit 72cbf57

Browse files
author
Malte Wessel
committed
fixed tests
1 parent a24ddf6 commit 72cbf57

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

test/Scrollbars/universal.js

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,13 @@ export default function createTests(scrollbarWidth) {
4949
<div style={{ width: 200, height: 200 }}/>
5050
</Scrollbars>
5151
), node, function callback() {
52-
const { view } = this;
53-
expect(view.style.overflow).toEqual('scroll');
54-
expect(view.style.marginBottom).toEqual(`${-scrollbarWidth}px`);
55-
expect(view.style.marginRight).toEqual(`${-scrollbarWidth}px`);
56-
done();
52+
setTimeout(() => {
53+
const { view } = this;
54+
expect(view.style.overflow).toEqual('scroll');
55+
expect(view.style.marginBottom).toEqual(`${-scrollbarWidth}px`);
56+
expect(view.style.marginRight).toEqual(`${-scrollbarWidth}px`);
57+
done();
58+
}, 100);
5759
});
5860
});
5961
});
@@ -91,13 +93,15 @@ export default function createTests(scrollbarWidth) {
9193
<div style={{ width: 200, height: 200 }}/>
9294
</Scrollbars>
9395
), node, function callback() {
94-
const { view } = this;
95-
expect(view.style.overflow).toEqual('scroll');
96-
expect(view.style.marginBottom).toEqual(`${-scrollbarWidth}px`);
97-
expect(view.style.marginRight).toEqual(`${-scrollbarWidth}px`);
98-
expect(view.style.minHeight).toEqual(`${scrollbarWidth}px`);
99-
expect(view.style.maxHeight).toEqual(`${100 + scrollbarWidth}px`);
100-
done();
96+
setTimeout(() => {
97+
const { view } = this;
98+
expect(view.style.overflow).toEqual('scroll');
99+
expect(view.style.marginBottom).toEqual(`${-scrollbarWidth}px`);
100+
expect(view.style.marginRight).toEqual(`${-scrollbarWidth}px`);
101+
expect(view.style.minHeight).toEqual(`${scrollbarWidth}px`);
102+
expect(view.style.maxHeight).toEqual(`${100 + scrollbarWidth}px`);
103+
done();
104+
});
101105
});
102106
});
103107
});

0 commit comments

Comments
 (0)