(pathCode: string)
| 5 | import { getJsxElementHash, getJsxAttributeValueHash } from "./hash"; |
| 6 | |
| 7 | function getFirstJsx(pathCode: string) { |
| 8 | const payload = createPayload({ |
| 9 | code: pathCode, |
| 10 | params: {} as any, |
| 11 | relativeFilePath: "x.tsx", |
| 12 | }); |
| 13 | let found: any; |
| 14 | traverse(payload.ast, { |
| 15 | JSXElement(p) { |
| 16 | if (!found) found = p; |
| 17 | }, |
| 18 | }); |
| 19 | return found as any; |
| 20 | } |
| 21 | |
| 22 | describe("utils/hash", () => { |
| 23 | describe("getJsxElementHash", () => { |
no test coverage detected