Skip to content

Factory QA ​

Factory QA Checklist: every unit passes unit, end-to-end, and build verification before shipping.

Tests are organized in three layers so package refactoring never breaks core behavior.

Unit Tests ​

@yunlefun-home/air-conditioner-core covers:

  • Default state.
  • Reducer actions.
  • Temperature min/max clamping.
  • Available and unavailable storage backends.
  • Notification generation.

@yunlefun-home/air-conditioner-widget covers:

  • Custom Element registration and mounting.
  • ac-change events.
  • ac-notify events.

End-to-End Tests ​

Playwright exercises the React site, standalone embed, and VitePress docs installation demo:

  • Homepage rendering and AC unit mounting.
  • Power toggling.
  • Cool / Heat mode switching.
  • Temperature adjustments and 16 / 31°C boundary tips.
  • localStorage persistence.
  • Standalone /rc remote control and /guide/floating-widget responsive demo.

Build Checks ​

Run before publishing:

bash
pnpm -r build
pnpm -r typecheck
pnpm test
pnpm docs:build
pnpm pack --dry-run

Released under the MIT License · The only catch is no actual wind