MCPcopy Create free account
hub / github.com/ZeeCoder/container-query / testElementToHaveStyle

Function testElementToHaveStyle

tests/utils/index.js:99–108  ·  view source on GitHub ↗
(element, style)

Source from the content-addressed store, hash-verified

97 * @return {boolean}
98 */
99export 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

Callers 4

index.jsFile · 0.90
testComponentToHaveStyleFunction · 0.85
loopFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected