Skip to content

Flaky property-based test in string_ops.test.ts with control characters #284

@mrjf

Description

@mrjf

Problem

tests/stats/string_ops.test.ts:356 has a fast-check property test that fails intermittently when the random generator produces control characters (like file separator).

error: Property failed after 87 tests
{ seed: -464398533, path: "86:20", endOnFailure: true }
Counterexample: ["��","�"]

The test passes on most runs (main is green) but fails when fast-check hits certain seeds that generate control characters.

Reproduction

bun test tests/stats/string_ops.test.ts --seed -464398533

Fix

The string operation being tested likely doesn't handle control characters correctly. Either:

  1. Fix the implementation to handle control characters
  2. Constrain the fast-check arbitrary to exclude control characters if they're out of scope

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions