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

Function expectElementToHaveCustomProperties

tests/utils/index.js:166–175  ·  view source on GitHub ↗
(element, props)

Source from the content-addressed store, hash-verified

164 * @param {{}} props
165 */
166export const expectElementToHaveCustomProperties = (element, props) => {
167 // Not all browsers tested here support custom css properties
168 if (!areCustomCssPropertiesSupported()) {
169 return;
170 }
171
172 for (let prop of Object.keys(props)) {
173 expect(element.style.getPropertyValue(prop)).toBe(props[prop]);
174 }
175};
176/**
177 * @param {HTMLElement} element
178 * @param {{}} props

Callers 3

loopFunction · 0.85

Calls 2

getPropertyValueMethod · 0.80

Tested by

no test coverage detected