Skip to content

feat(tests): add complete test suite with unit, integration, E2E and …#30

Open
Edithct wants to merge 1 commit into
leviarista:mainfrom
Edithct:Tests
Open

feat(tests): add complete test suite with unit, integration, E2E and …#30
Edithct wants to merge 1 commit into
leviarista:mainfrom
Edithct:Tests

Conversation

@Edithct
Copy link
Copy Markdown

@Edithct Edithct commented May 21, 2026

…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)

Pull Request Title

Description

Summary why you opened this PR, you may add the benefits this PR provides.

Changes

Please describe your changes, if needed attach screenshots.

  1. Fix ...
  2. Refactor ...
  3. Update ...
  4. Implement ...

Screenshots

(If applicable)

Picture Name
Insert your picture link

Related Issues

Please add any related issue(s):

This PR:

  • Fixes [Issue ticket name](Issue ticket link)
  • Implements [Issue ticket name](Issue ticket link)

Aditional information

Provide any additional information that might be useful.

…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant