Commit e8aae22
committed
feat(tests): add complete test suite with unit, integration, E2E and mutation testing
- Add Vitest unit tests: getPattern (70), presets with Zod oracle (21), helpers (11)
- Add Vitest integration tests: banner.js (27), localStorage (16)
- Add Playwright E2E tests: banner customization, accessibility (axe-core WCAG 2.1 AA), performance
- Add Stryker mutation testing config for presets.js and helpers.js
- Add ESLint + eslint-plugin-security for static analysis (OWASP Top 10)
- Add @faker-js/faker for test data generation
- Add Zod schemas as validation oracles (PresetSchema, ThemeSchema, PatternResultSchema)
- Add vitest.config.js with jsdom environment and coverage thresholds (lines>=70%, functions>=80%)
- Add playwright.config.ts with 4 browsers (chromium, firefox, webkit, mobile-chrome)
- Add TESTING.md with full technical documentation of the test suite
- Add trabajo.md with project presentation and analysis
- Update package.json: add type:module + all testing devDependencies + npm scripts
Coverage achieved: 74% lines, 72% branches, 100% functions
Bugs found: 7 (including 1 critical TypeError in banner.js)
E2E results: 29/34 pass, 5 fail (real production bugs - accessibility violations WCAG 2.1)1 parent d497d26 commit e8aae22
21 files changed
Lines changed: 12653 additions & 1421 deletions
File tree
- tests
- e2e
- banner-customization.spec.ts-snapshots
- integration
- unit
- __snapshots__
- utils
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments