Skip to content

Commit

Permalink
Fix linter and type issues
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Sand <[email protected]>
  • Loading branch information
deiga committed Oct 13, 2020
1 parent d154d8b commit 7481f1d
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions packages/material-ui/src/ButtonBase/ButtonBase.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ describe('<ButtonBase />', () => {
Hello
</ButtonBase>,
);
// @ts-ignore
stub(container.querySelector('.touch-ripple'), 'getBoundingClientRect').callsFake(() => ({
width: 100,
height: 100,
Expand All @@ -443,14 +444,13 @@ describe('<ButtonBase />', () => {
top: 20,
}));
fireEvent.mouseDown(getByRole('button'), { clientX: 10, clientY: 10 });
expect(container.querySelector('.touch-ripple-ripple').style).to.have.property(
'height',
'101px',
);
expect(container.querySelector('.touch-ripple-ripple').style).to.have.property(
'width',
'101px',
);
const rippleRipple = container.querySelector('.touch-ripple-ripple');
expect(rippleRipple).to.not.equal(null);
if (rippleRipple !== null) {
const rippleSyle = window.getComputedStyle(rippleRipple);
expect(rippleSyle).to.have.property('height', '101px');
expect(rippleSyle).to.have.property('width', '101px');
}
});

it('is disabled by default', () => {
Expand All @@ -461,6 +461,7 @@ describe('<ButtonBase />', () => {
Hello
</ButtonBase>,
);
// @ts-ignore
stub(container.querySelector('.touch-ripple'), 'getBoundingClientRect').callsFake(() => ({
width: 100,
height: 100,
Expand All @@ -469,14 +470,13 @@ describe('<ButtonBase />', () => {
top: 20,
}));
fireEvent.mouseDown(getByRole('button'), { clientX: 10, clientY: 10 });
expect(container.querySelector('.touch-ripple-ripple').style).to.not.have.property(
'height',
'101px',
);
expect(container.querySelector('.touch-ripple-ripple').style).to.not.have.property(
'width',
'101px',
);
const rippleRipple = container.querySelector('.touch-ripple-ripple');
expect(rippleRipple).to.not.equal(null);
if (rippleRipple !== null) {
const rippleSyle = window.getComputedStyle(rippleRipple);
expect(rippleSyle).to.not.have.property('height', '101px');
expect(rippleSyle).to.not.have.property('width', '101px');
}
});
});

Expand Down

0 comments on commit 7481f1d

Please sign in to comment.