Files
bun.sh/test/cli/run/jsx-namespaced-attributes.test.ts
Varun Narravula fc92921a4a fix: parse JSX namespace identifiers that have numbers in them (#19912)
Co-authored-by: Michael H <git@riskymh.dev>
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2025-05-27 15:45:11 -07:00

11 lines
462 B
TypeScript

import { expect, it } from "bun:test";
import { nsExample1, nsExample2, nsExample3, nsExample4 } from "../../snippets/jsx-attributes.tsx";
it("parses namespaced attributes correctly", () => {
expect(nsExample1.props).toEqual({ "ns:bar": "baz", "tag": true });
expect(nsExample2.props).toEqual({ "ns:bar42": "baz", "tag": false });
expect(nsExample3.props).toEqual({ "ns:bar42bar": "baz" });
expect(nsExample4.props).toEqual({ "ns42:bar": "baz" });
});