(this: jest.MatcherContext, instance: TestInstance)
| 7 | import { checkHostElement } from './utils'; |
| 8 | |
| 9 | export function toBeExpanded(this: jest.MatcherContext, instance: TestInstance) { |
| 10 | checkHostElement(instance, toBeExpanded, this); |
| 11 | |
| 12 | return { |
| 13 | pass: computeAriaExpanded(instance) === true, |
| 14 | message: () => { |
| 15 | const matcher = matcherHint(`${this.isNot ? '.not' : ''}.toBeExpanded`, 'instance', ''); |
| 16 | return [ |
| 17 | matcher, |
| 18 | '', |
| 19 | `Received instance is ${this.isNot ? '' : 'not '}expanded:`, |
| 20 | redent(formatElement(instance), 2), |
| 21 | ].join('\n'); |
| 22 | }, |
| 23 | }; |
| 24 | } |
| 25 | |
| 26 | export function toBeCollapsed(this: jest.MatcherContext, instance: TestInstance) { |
| 27 | checkHostElement(instance, toBeCollapsed, this); |
nothing calls this directly
no test coverage detected
searching dependent graphs…