File tree Expand file tree Collapse file tree 1 file changed +1
-30
lines changed Expand file tree Collapse file tree 1 file changed +1
-30
lines changed Original file line number Diff line number Diff line change 1- import { debounce , computeTooltipPosition , cssTimeToMs , cssSupports } from 'utils'
1+ import { debounce , computeTooltipPosition , cssTimeToMs } from 'utils'
22
33// Tell Jest to mock all timeout functions
44jest . useRealTimers ( )
@@ -86,35 +86,6 @@ describe('compute positions', () => {
8686 } )
8787} )
8888
89- describe ( 'css supports' , ( ) => {
90- let windowSpy
91-
92- beforeEach ( ( ) => {
93- windowSpy = jest . spyOn ( window , 'window' , 'get' )
94- } )
95-
96- afterEach ( ( ) => {
97- windowSpy . mockRestore ( )
98- } )
99-
100- test ( 'returns true if css property is supported' , ( ) => {
101- expect ( cssSupports ( 'position' , 'relative' ) ) . toBe ( true )
102- } )
103-
104- test ( 'returns false if css property is not supported' , ( ) => {
105- expect ( cssSupports ( 'position' , 'foo' ) ) . toBe ( false )
106- } )
107-
108- test ( 'returns true if `window.CSS.supports` is not available' , ( ) => {
109- windowSpy . mockImplementation ( ( ) => ( {
110- CSS : {
111- supports : undefined ,
112- } ,
113- } ) )
114- expect ( cssSupports ( 'position' , 'foo' ) ) . toBe ( true )
115- } )
116- } )
117-
11889describe ( 'css time to ms' , ( ) => {
11990 test ( 'converts time correctly' , ( ) => {
12091 expect ( cssTimeToMs ( '1s' ) ) . toBe ( 1000 )
You can’t perform that action at this time.
0 commit comments