Skip to content

Conversation

@Mnehmos
Copy link
Owner

@Mnehmos Mnehmos commented Dec 13, 2025

This pull request improves the reliability and clarity of the "successful save halves damage" test for Fireball in the spellcasting test suite. The test now uses a retry mechanism to reduce flakiness due to randomness and ensures that the wizard's spell slot usage matches SRD constraints. Additionally, the random seed is made unique per retry to further reduce the chance of repeated failures.

Test reliability and determinism improvements:

  • Added a retry mechanism (retry: 5) to the Fireball save test to minimize flakiness from random number generation, and updated comments to clarify the probability of test failure.
  • Changed the random seed in handleCreateEncounter to include a timestamp, ensuring each retry uses a different RNG sequence.

Test logic and clarity improvements:

  • Adjusted the wizard's spell slot setup to match SRD constraints for a level 5 wizard, and limited Fireball casts to two per test run.
  • Simplified the test flow by removing unnecessary warnings and checks, and clarified the expectation that at least one successful save should occur (with retries if necessary).

@Mnehmos Mnehmos merged commit b489e36 into staging Dec 13, 2025
6 checks passed
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