(html: string)
| 4 | |
| 5 | describe('getNodeAssetAttributes', () => { |
| 6 | const getNode = (html: string) => { |
| 7 | const ast = parseFragment(html, { sourceCodeLocationInfo: true }) |
| 8 | return ast.childNodes[0] as DefaultTreeAdapterMap['element'] |
| 9 | } |
| 10 | |
| 11 | test('handles img src', () => { |
| 12 | const node = getNode('<img src="foo.jpg">') |