(html: string)
| 2 | import { queryByAttr } from "./cssSelector"; |
| 3 | |
| 4 | function makeDoc(html: string) { |
| 5 | const { parseHTML } = require("linkedom"); |
| 6 | const { document } = parseHTML(`<html><body>${html}</body></html>`); |
| 7 | return document; |
| 8 | } |
| 9 | |
| 10 | describe("queryByAttr", () => { |
| 11 | it("finds element by exact attribute match", () => { |