@@ -3,7 +3,6 @@ import { assert } from 'chai';
33import { spy , stub , useFakeTimers } from 'sinon' ;
44import { createMount , describeConformance } from '@material-ui/core/test-utils' ;
55import Slide , { setTranslateValue } from './Slide' ;
6- import transitions , { easing } from '../styles/transitions' ;
76import createMuiTheme from '../styles/createMuiTheme' ;
87
98describe ( '<Slide />' , ( ) => {
@@ -102,7 +101,7 @@ describe('<Slide />', () => {
102101
103102 describe ( 'handleEntering()' , ( ) => {
104103 it ( 'should reset the translate3d' , ( ) => {
105- assert . strictEqual ( handleEntering . args [ 0 ] [ 0 ] . style . transform , ' translate(0 , 0)' ) ;
104+ assert . match ( handleEntering . args [ 0 ] [ 0 ] . style . transform , / t r a n s l a t e \( 0 ( p x ) ? , 0 ( p x ) ? \) / ) ;
106105 } ) ;
107106
108107 it ( 'should call handleEntering' , ( ) => {
@@ -171,20 +170,18 @@ describe('<Slide />', () => {
171170 } ) ;
172171
173172 it ( 'should create proper easeOut animation onEntering' , ( ) => {
174- const animation = transitions . create ( 'transform' , {
175- duration : enterDuration ,
176- easing : easing . easeOut ,
177- } ) ;
178- assert . strictEqual ( handleEntering . args [ 0 ] [ 0 ] . style . transition , animation ) ;
173+ assert . match (
174+ handleEntering . args [ 0 ] [ 0 ] . style . transition ,
175+ / t r a n s f o r m 5 5 6 m s c u b i c - b e z i e r \( 0 ( .0 ) ? , 0 , 0 .2 , 1 \) ( 0 m s ) ? / ,
176+ ) ;
179177 } ) ;
180178
181179 it ( 'should create proper sharp animation onExit' , ( ) => {
182180 wrapper . setProps ( { in : false } ) ;
183- const animation = transitions . create ( 'transform' , {
184- duration : leaveDuration ,
185- easing : easing . sharp ,
186- } ) ;
187- assert . strictEqual ( handleExit . args [ 0 ] [ 0 ] . style . transition , animation ) ;
181+ assert . match (
182+ handleExit . args [ 0 ] [ 0 ] . style . transition ,
183+ / t r a n s f o r m 4 4 6 m s c u b i c - b e z i e r \( 0 .4 , 0 , 0 .6 , 1 \) ( 0 m s ) ? / ,
184+ ) ;
188185 } ) ;
189186 } ) ;
190187
0 commit comments