Skip to content

test: Add tests for web-components/define.ts registration #3

Description

@annondeveloper

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions