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-changeevents.ac-notifyevents.
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.
localStoragepersistence.- Standalone
/rcremote control and/guide/floating-widgetresponsive demo.
Build Checks
Run before publishing:
bash
pnpm -r build
pnpm -r typecheck
pnpm test
pnpm docs:build
pnpm pack --dry-run