mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
- Adds `examples/reproducers/issue-hashtag-prefs/reproduce_issue.mjs` to reproduce flaky hashtag preferences unit test. - Adds `examples/reproducers/issue-moderation-flake/reproduce_flake.spec.ts` to reproduce flaky moderation visual test in headless mode. - Includes README instructions for running each reproducer. Co-authored-by: PR0M3TH3AN <[email protected]>
Hashtag Preferences Flakiness Reproducer
This script reproduces a flaky unit test in tests/hashtag-preferences.test.mjs.
Issue
The original test case "load defers permission-required decrypts until explicitly enabled" was flaky due to runNip07WithRetry/microtask timing. The test has been extracted into a standalone script reproduce_issue.mjs here.
How to Run
From the root of the repository:
node examples/reproducers/issue-hashtag-prefs/reproduce_issue.mjs
Expected Outcome
- The test may pass (flake is resolved or timing is favorable).
- Or it may fail with an error related to "Decrypt permissions are required", but the assertion
decryptCalls.lengthbeing 0 instead of 1 (if the promise resolution happens too late).