Skip to content

test: add fast-check property-based (fuzz) tests and fix what they found - #2409

Merged
rkaraivanov merged 1 commit into
masterfrom
rkaraivanov/add-fuzzing-testing
Sep 28, 2026
Merged

rkaraivanov merged 1 commit into
masterfrom
rkaraivanov/add-fuzzing-testing

Conversation

@rkaraivanov

Copy link
Copy Markdown
Member

Description

Add *.property.spec.ts suites for the mask, date, color, QR, tile layout and internal utility code, with a fixed seed in CI and a weekly random-seed Fuzz workflow. The OpenSSF Scorecard Fuzzing check passes.

Fixes found by the properties and the review:

  • tile-manager: loadLayout copies only tile properties (innerHTML/proto)
  • qr-code: correct V30-V40/M data codeword counts
  • mask: UTF-16 positions, reject astral input and prompts, keep flag literals
  • mask-input: an empty optional control is no bad input
  • date: keep years 0-99 (also in CalendarDay), widen y/yyy, literal separators
  • date-range-picker: no TypeError for min/max set before the first render
  • color, sameItems, equal, asNumber: NaN and edge-case fixes

Move shared date and property-test helpers into src/internals and make runValidationContainerTests await its checks.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • Refactoring (code improvements without functional changes)

Checklist

  • My code follows the project's coding standards
  • I have tested my changes locally
  • I have updated documentation if needed
  • I have added a CHANGELOG.md entry under [Unreleased]
  • I have read the contributing guidelines, including the accessibility, dependency and security rules

Add *.property.spec.ts suites for the mask, date, color, QR, tile layout and
internal utility code, with a fixed seed in CI and a weekly random-seed Fuzz
workflow. The OpenSSF Scorecard Fuzzing check passes.

Fixes found by the properties and the review:
- tile-manager: loadLayout copies only tile properties (innerHTML/__proto__)
- qr-code: correct V30-V40/M data codeword counts
- mask: UTF-16 positions, reject astral input and prompts, keep flag literals
- mask-input: an empty optional control is no bad input
- date: keep years 0-99 (also in CalendarDay), widen y/yyy, literal separators
- date-range-picker: no TypeError for min/max set before the first render
- color, sameItems, equal, asNumber: NaN and edge-case fixes

Move shared date and property-test helpers into src/internals and make
runValidationContainerTests await its checks.
Copilot AI lite review requested due to automatic review settings September 28, 2026 19:39
@rkaraivanov
rkaraivanov merged commit 9951e0c into master Sep 28, 2026
8 checks passed
@rkaraivanov
rkaraivanov deleted the rkaraivanov/add-fuzzing-testing branch September 28, 2026 20:14
@rkaraivanov
rkaraivanov removed the request for review from Copilot September 28, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant