(element, styles)
| 306 | * @param {{}[]} styles |
| 307 | */ |
| 308 | export const expectElementToHaveOneOfStyles = (element, styles) => { |
| 309 | const styleCount = styles.length; |
| 310 | for (let i = 0; i < styleCount; i++) { |
| 311 | const success = testElementToHaveStyle(element, styles[i]); |
| 312 | |
| 313 | if (success) { |
| 314 | return expectElementToHaveStyle(element, styles[i]); |
| 315 | } |
| 316 | } |
| 317 | |
| 318 | // non of the provided styles are available, report error |
| 319 | // todo report which styles were tried, and what were the diffs |
| 320 | fail("Non of the provided styles matched the element's style."); |
| 321 | }; |
| 322 | |
| 323 | /** |
| 324 | * @param {{}[]} styles |
no test coverage detected