()
| 28 | |
| 29 | // A no-op DOM-ish node that swallows whatever the shell does to it. |
| 30 | const makeFakeNode = () => { |
| 31 | const node: any = { |
| 32 | innerHTML: '', |
| 33 | textContent: '', |
| 34 | style: {} as Record<string, string>, |
| 35 | setAttribute: () => {}, |
| 36 | appendChild: (child: unknown) => child, |
| 37 | removeChild: (child: unknown) => child, |
| 38 | } |
| 39 | return node |
| 40 | } |
| 41 | |
| 42 | const fakeDocument: any = { |
| 43 | head: makeFakeNode(), |