(element, props)
| 179 | * @return {boolean} |
| 180 | */ |
| 181 | export const testElementToHaveCustomProperties = (element, props) => { |
| 182 | // Not all browsers tested here support custom css properties |
| 183 | if (!areCustomCssPropertiesSupported()) { |
| 184 | return true; |
| 185 | } |
| 186 | |
| 187 | for (let prop of Object.keys(props)) { |
| 188 | if (element.style.getPropertyValue(prop) !== props[prop]) { |
| 189 | return false; |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | return true; |
| 194 | }; |
| 195 | |
| 196 | /** |
| 197 | * @param {{}} props |
no test coverage detected