()
| 140 | // JSDOM doesn't support custom properties on style object so we have to |
| 141 | // mock it here. |
| 142 | function mockElementWithStyle() { |
| 143 | const store: any = {} |
| 144 | return { |
| 145 | style: { |
| 146 | display: '', |
| 147 | WebkitTransition: '', |
| 148 | setProperty(key: string, val: string) { |
| 149 | store[key] = val |
| 150 | }, |
| 151 | getPropertyValue(key: string) { |
| 152 | return store[key] |
| 153 | }, |
| 154 | }, |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | it('CSS custom properties', () => { |
| 159 | const el = mockElementWithStyle() |