(element, style)
| 97 | * @return {boolean} |
| 98 | */ |
| 99 | export const testElementToHaveStyle = (element, style) => { |
| 100 | const computedStyle = getComputedStyle(element); |
| 101 | for (let prop of Object.keys(style)) { |
| 102 | if (computedStyle[prop] !== style[prop]) { |
| 103 | return false; |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | return true; |
| 108 | }; |
| 109 | |
| 110 | /** |
| 111 | * @param {{}} style |
no outgoing calls
no test coverage detected