Skip to content

Commit

Permalink
fix broken matcher documentation for dates (#4019)
Browse files Browse the repository at this point in the history
fix documentation, table for date matchers where broken
  • Loading branch information
dzappold committed May 17, 2024
1 parent 1dbd492 commit 9df1973
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
40 changes: 20 additions & 20 deletions documentation/docs/assertions/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,26 +187,26 @@ Matchers provided by the `kotest-assertions-core` module.
| `file.shouldBeSymbolicLink()` | Asserts that the file is a symbolic link. |
| `file.shouldHaveParent(name)` | Assert that the file has a parent with the given name |

| Dates ||
|-----------------------------------------------|--------------------------------------------------------- Asserts that the date has the same year as the given date. -----------------|
| `date.shouldHaveSameYearAs(otherDate)` | Asserts that the date has the same year as the given date. |
| `date.shouldHaveSameMonthAs(otherDate)` | Asserts that the date has the same month as the given date. |
| `date.shouldHaveSameDayAs(otherDate)` | Asserts that the date has the same day of the month as the given date. |
| `date.shouldBeBefore(otherDate)` | Asserts that the date is before the given date. |
| `date.shouldBeAfter(otherDate)` | Asserts that the date is after the given date. |
| `date.shouldBeWithin(period, otherDate)` | Asserts that the date is within the period of the given date. |
| `date.shouldBeWithin(duration, otherDate)` | Asserts that the date is within the duration of the given date. |
| `date.shouldBeBetween(firstDate, secondDate)` | Asserts that the date is between firstdate and seconddate. |
| `date.shouldHaveYear(year)` | Asserts that the date have correct year. |
| `date.shouldHaveMonth(month)` | Asserts that the date have correct month. |
| `date.shouldHaveDayOfYear(day)` | Asserts that the date have correct day of year. |
| `date.shouldHaveDayOfMonth(day)` | Asserts that the date have correct day of month. |
| `date.shouldHaveDayOfWeek(day)` | Asserts that the date have correct day of week. |
| `date.shouldHaveHour(hour)` | Asserts that the date have correct hour. |
| `date.shouldHaveMinute(Minute)` | Asserts that the date have correct minute. |
| `date.shouldHaveSecond(second)` | Asserts that the date have correct second. |
| `date.shouldHaveNano(nao)` | Asserts that the date have correct nano second. |
| `date.shouldBe(value plusOrMinus(tolerance))` | Asserts that the date is equal to the given value within a tolerance range of duration. |
| Dates | |
|-----------------------------------------------|-----------------------------------------------------------------------------------------|
| `date.shouldHaveSameYearAs(otherDate)` | Asserts that the date has the same year as the given date. |
| `date.shouldHaveSameMonthAs(otherDate)` | Asserts that the date has the same month as the given date. |
| `date.shouldHaveSameDayAs(otherDate)` | Asserts that the date has the same day of the month as the given date. |
| `date.shouldBeBefore(otherDate)` | Asserts that the date is before the given date. |
| `date.shouldBeAfter(otherDate)` | Asserts that the date is after the given date. |
| `date.shouldBeWithin(period, otherDate)` | Asserts that the date is within the period of the given date. |
| `date.shouldBeWithin(duration, otherDate)` | Asserts that the date is within the duration of the given date. |
| `date.shouldBeBetween(firstDate, secondDate)` | Asserts that the date is between firstdate and seconddate. |
| `date.shouldHaveYear(year)` | Asserts that the date have correct year. |
| `date.shouldHaveMonth(month)` | Asserts that the date have correct month. |
| `date.shouldHaveDayOfYear(day)` | Asserts that the date have correct day of year. |
| `date.shouldHaveDayOfMonth(day)` | Asserts that the date have correct day of month. |
| `date.shouldHaveDayOfWeek(day)` | Asserts that the date have correct day of week. |
| `date.shouldHaveHour(hour)` | Asserts that the date have correct hour. |
| `date.shouldHaveMinute(Minute)` | Asserts that the date have correct minute. |
| `date.shouldHaveSecond(second)` | Asserts that the date have correct second. |
| `date.shouldHaveNano(nao)` | Asserts that the date have correct nano second. |
| `date.shouldBe(value plusOrMinus(tolerance))` | Asserts that the date is equal to the given value within a tolerance range of duration. |

| ZonedDateTime ||
|----------------------------------------------------------------------| ---- |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Matchers provided by the `kotest-assertions-core` module.
| `file.shouldHaveParent(name)` | Assert that the file has a parent with the given name |

| Dates ||
|-----------------------------------------------|--------------------------------------------------------- Asserts that the date has the same year as the given date. -----------------|
|-----------------------------------------------|--------------------------------------------------------------------------|
| `date.shouldHaveSameYearAs(otherDate)` | Asserts that the date has the same year as the given date. |
| `date.shouldHaveSameMonthAs(otherDate)` | Asserts that the date has the same month as the given date. |
| `date.shouldHaveSameDayAs(otherDate)` | Asserts that the date has the same day of the month as the given date. |
Expand Down

0 comments on commit 9df1973

Please sign in to comment.