(element: HTMLElement, expectation: string)
| 2376 | } |
| 2377 | |
| 2378 | function expectHTML(element: HTMLElement, expectation: string) { |
| 2379 | const actual = element.innerHTML |
| 2380 | .replace(/<!--(\W|\w)*?-->/g, '') |
| 2381 | .replace(/\s(ng-reflect|_nghost|_ngcontent)-\S*="[^"]*"/g, ''); |
| 2382 | expect(actual.replace(/\s/g, '') === expectation.replace(/\s/g, '')) |
| 2383 | .withContext(`HTML does not match expectation. Actual HTML:\n${actual}`) |
| 2384 | .toBe(true); |
| 2385 | } |
| 2386 | |
| 2387 | function setMarker(node: Node) { |
| 2388 | (node as any)[CREATED_INITIALLY_MARKER] = true; |
no test coverage detected