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'
2
2
3
3
// Tell Jest to mock all timeout functions
4
4
jest . useRealTimers ( )
@@ -86,35 +86,6 @@ describe('compute positions', () => {
86
86
} )
87
87
} )
88
88
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
-
118
89
describe ( 'css time to ms' , ( ) => {
119
90
test ( 'converts time correctly' , ( ) => {
120
91
expect ( cssTimeToMs ( '1s' ) ) . toBe ( 1000 )
You can’t perform that action at this time.
0 commit comments