Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Malte Wessel committed Oct 19, 2017
1 parent a24ddf6 commit 72cbf57
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions test/Scrollbars/universal.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ export default function createTests(scrollbarWidth) {
<div style={{ width: 200, height: 200 }}/>
</Scrollbars>
), node, function callback() {
const { view } = this;
expect(view.style.overflow).toEqual('scroll');
expect(view.style.marginBottom).toEqual(`${-scrollbarWidth}px`);
expect(view.style.marginRight).toEqual(`${-scrollbarWidth}px`);
done();
setTimeout(() => {
const { view } = this;
expect(view.style.overflow).toEqual('scroll');
expect(view.style.marginBottom).toEqual(`${-scrollbarWidth}px`);
expect(view.style.marginRight).toEqual(`${-scrollbarWidth}px`);
done();
}, 100);
});
});
});
Expand Down Expand Up @@ -91,13 +93,15 @@ export default function createTests(scrollbarWidth) {
<div style={{ width: 200, height: 200 }}/>
</Scrollbars>
), node, function callback() {
const { view } = this;
expect(view.style.overflow).toEqual('scroll');
expect(view.style.marginBottom).toEqual(`${-scrollbarWidth}px`);
expect(view.style.marginRight).toEqual(`${-scrollbarWidth}px`);
expect(view.style.minHeight).toEqual(`${scrollbarWidth}px`);
expect(view.style.maxHeight).toEqual(`${100 + scrollbarWidth}px`);
done();
setTimeout(() => {
const { view } = this;
expect(view.style.overflow).toEqual('scroll');
expect(view.style.marginBottom).toEqual(`${-scrollbarWidth}px`);
expect(view.style.marginRight).toEqual(`${-scrollbarWidth}px`);
expect(view.style.minHeight).toEqual(`${scrollbarWidth}px`);
expect(view.style.maxHeight).toEqual(`${100 + scrollbarWidth}px`);
done();
});
});
});
});
Expand Down

0 comments on commit 72cbf57

Please sign in to comment.