Add Kiddush Levana tests#34
Open
mjradwin wants to merge 11 commits into
Open
Conversation
This commit adds a new test file `tests/ComplexZmanimCalendar.test.ts` with comprehensive unit tests for the `ComplexZmanimCalendar` class. The tests cover all public methods, ensuring their current behavior is captured and protected against future regressions. The test setup uses a fixed location and date for consistency and comparability with other tests in the suite.
…dar.ts`. While working on this, I also found and fixed a bug in the `isAssurBemlacha` method. The issue was that `Temporal.ZonedDateTime` objects were being compared incorrectly. The new tests are located in `tests/ZmanimCalendar.test.ts`. To ensure their accuracy, I generated the expected values from the current version of your library.
…Java implementation
Test all five Kiddush Levana methods (getZmanMolad, getTchilasZmanKidushLevana3Days, getTchilasZmanKidushLevana7Days, getSofZmanKidushLevanaBetweenMoldos, getSofZmanKidushLevana15Days) with edge cases for Hebrew month days 28, 29, 30, and 1. Verifies null return for day 10 and other out-of-range days, tests forward-to-next-month logic for getZmanMolad and 3days on day 30, and covers alos/tzais daytime adjustment path through getMoladBasedTime. https://claude.ai/code/session_01TFJ6vGqedtk2GC9kvRkAUp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added 29 new Kiddush Levana tests to
tests/complex.test.tscovering all five ComplexZmanimCalendar methods:Methods tested:
getZmanMolad()getTchilasZmanKidushLevana3Days()getTchilasZmanKidushLevana7Days()getSofZmanKidushLevanaBetweenMoldos()getSofZmanKidushLevana15Days()Coverage achieved:
getZmanMoladday > 26 forward path (days 28 and 30) andgetTchilasZmanKidushLevana3Daysday == 30 forward pathgetMoladBasedTimepaths: Covered the null path (zman outside midnight-midnight), the no-alos/tzais path (returns raw time), and the alos/tzais path (returns alos for daytime zman)All 255 tests pass (was 226, added 29 new).