The defineCustomElements() function in src/web-components/define.ts registers 20 React components as web custom elements, but has no test coverage.
What to test:
defineCustomElements() registers all 20 elements without throwing
- Custom prefix parameter works (
defineCustomElements('my') → <my-button>)
- Duplicate registration is handled gracefully
- Each registered element has the correct
observedAttributes
Reference: See src/__tests__/web-components/wrapper.test.ts for test style.
File to create: src/__tests__/web-components/define.test.ts
Skills needed: TypeScript, vitest, Web Components API
The
defineCustomElements()function insrc/web-components/define.tsregisters 20 React components as web custom elements, but has no test coverage.What to test:
defineCustomElements()registers all 20 elements without throwingdefineCustomElements('my')→<my-button>)observedAttributesReference: See
src/__tests__/web-components/wrapper.test.tsfor test style.File to create:
src/__tests__/web-components/define.test.tsSkills needed: TypeScript, vitest, Web Components API