Skip to content

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

Merged
leviarista merged 1 commit into
leviarista:mainfrom
Edithct:Tests
Jun 8, 2026
Merged

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

Conversation

@Edithct

@Edithct Edithct commented May 21, 2026

Copy link
Copy Markdown
Contributor

…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)
@leviarista leviarista merged commit 339da6f into leviarista:main Jun 8, 2026
1 check passed
@leviarista

Copy link
Copy Markdown
Owner

Thank you @Edithct !!
I will make some maintenance on the code according to the results.
I appreciate it! 😊✌️

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.

2 participants