Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve test coverage #398

Open
tukusejssirs opened this issue Oct 18, 2022 · 0 comments
Open

Improve test coverage #398

tukusejssirs opened this issue Oct 18, 2022 · 0 comments
Labels
concept: infrastructure Anything related to the surrounding tools and infrastructure to support romcal
Milestone

Comments

@tukusejssirs
Copy link
Member

tukusejssirs commented Oct 18, 2022

We should improve test coverage of romcal@3.

IMO we should first define the structure of tests, what should be tested and how we should test it.

IMHO we should test the following [WIP]:

  • unit tests:
    • test all functions and methods defined in all files under lib/;
  • e2e tests:
    • build romcal with different local timezones:
      • build romcal with local timezone;
      • build romcal with American timezone;
      • build romcal with European timezone;
      • build romcal with Asian timezone;

IMHO we should test romcal (AKA test rules):

  • against a larger range of years:
    • we already do that, albeit partially;
    • we could test romcal since 1970 to 2100;
  • we should try to find all possibilities (on which week day a particular celebration could occur, occurrances of different celebrations on the same day, etc) and test them all;
  • never combine unrelated tests into test suites:
    • IMHO currently, we combine tests without any logic a bit;
  • use Jest snapshots (or something else), to compare data of full generated years (a set of different years with a set of different calendars);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
concept: infrastructure Anything related to the surrounding tools and infrastructure to support romcal
Projects
None yet
Development

No branches or pull requests

1 participant