Skip to content

Commit

Permalink
fix: fix karma tests
Browse files Browse the repository at this point in the history
  • Loading branch information
benny0642 committed Aug 8, 2021
1 parent 561b119 commit 86b32b7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/material-ui/src/Slide/Slide.test.js
Expand Up @@ -254,7 +254,7 @@ describe('<Slide />', () => {

setProps({ in: true });

expect(nodeEnterTransformStyle).to.equal('translateX(724px)');
expect(nodeEnterTransformStyle).to.equal(`translateX(${global.innerWidth - 300}px)`);
});

it('should set element transform and transition in the `right` direction', () => {
Expand All @@ -272,7 +272,7 @@ describe('<Slide />', () => {

setProps({ in: true });

expect(nodeEnterTransformStyle).to.equal('translateX(-800px)');
expect(nodeEnterTransformStyle).to.equal(`translateX(-${300 + 500}px)`);
});

it('should set element transform and transition in the `up` direction', () => {
Expand All @@ -290,7 +290,7 @@ describe('<Slide />', () => {

setProps({ in: true });

expect(nodeEnterTransformStyle).to.equal('translateY(568px)');
expect(nodeEnterTransformStyle).to.equal(`translateY(${global.innerHeight - 200}px)`);
});

it('should set element transform and transition in the `down` direction', () => {
Expand Down Expand Up @@ -347,7 +347,7 @@ describe('<Slide />', () => {

setProps({ in: true });

expect(nodeEnterTransformStyle).to.equal('translateY(868px)');
expect(nodeEnterTransformStyle).to.equal(`translateY(${global.innerHeight + 100}px)`);
});

it('should set element transform in the `left` direction when element is offscreen', () => {
Expand All @@ -366,7 +366,7 @@ describe('<Slide />', () => {

setProps({ in: true });

expect(nodeEnterTransformStyle).to.equal('translateX(1124px)');
expect(nodeEnterTransformStyle).to.equal(`translateX(${global.innerWidth + 100}px)`);
});
});

Expand All @@ -387,7 +387,7 @@ describe('<Slide />', () => {

setProps({ in: false });

expect(nodeExitingTransformStyle).to.equal('translateX(724px)');
expect(nodeExitingTransformStyle).to.equal(`translateX(${global.innerWidth - 300}px)`);
});

it('should set element transform and transition in the `right` direction', () => {
Expand Down Expand Up @@ -425,7 +425,7 @@ describe('<Slide />', () => {

setProps({ in: false });

expect(nodeExitingTransformStyle).to.equal('translateY(568px)');
expect(nodeExitingTransformStyle).to.equal(`translateY(${global.innerHeight - 200}px)`);
});

it('should set element transform and transition in the `down` direction', () => {
Expand Down Expand Up @@ -505,7 +505,7 @@ describe('<Slide />', () => {
style: {},
};
setTranslateValue('up', element);
expect(element.style.transform).to.equal('translateY(-12px)');
expect(element.style.transform).to.equal(`translateY(${global.innerHeight - 780}px)`);
});

it('should do nothing when visible', () => {
Expand Down

0 comments on commit 86b32b7

Please sign in to comment.