Skip to content

Commit

Permalink
Merge pull request #131 from mikenichols/fix-build-failure
Browse files Browse the repository at this point in the history
Fix build failure
  • Loading branch information
mikenichols authored Jan 8, 2025
2 parents 1169aee + d11d641 commit 1fef583
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/__tests__/expiration-year.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,24 @@ describe("expirationYear", () => {
"accepts two-digit years",
[
[
yearsFromNow(0, 2),
{ isValid: true, isPotentiallyValid: true, isCurrentYear: true },
"19",
{ isValid: false, isPotentiallyValid: false, isCurrentYear: false },
],
[
yearsFromNow(-5, 2),
"20",
{ isValid: false, isPotentiallyValid: true, isCurrentYear: false },
],
[
// When this test case fails in 2081 (because 21 will become a valid
// year prefix) you can just switch isPotentiallyValid to true and
// delete this comment.
"21",
{ isValid: false, isPotentiallyValid: false, isCurrentYear: false },
],
[
yearsFromNow(0, 2),
{ isValid: true, isPotentiallyValid: true, isCurrentYear: true },
],
[
yearsFromNow(5, 2),
{ isValid: true, isPotentiallyValid: true, isCurrentYear: false },
Expand Down

0 comments on commit 1fef583

Please sign in to comment.