Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dripcoding committed Dec 17, 2023
1 parent b05f241 commit 3501411
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ exports[`components/cardDetail/comment return comment 1`] = `
</div>
<div
class="octo-tooltip tooltip-top"
data-tooltip="October 01, 2020 at 12:00 AM"
data-tooltip="October 01, 2020, 12:00 AM"
>
<div
class="comment-date"
Expand Down Expand Up @@ -147,7 +147,7 @@ exports[`components/cardDetail/comment return comment and delete comment 1`] = `
</div>
<div
class="octo-tooltip tooltip-top"
data-tooltip="October 01, 2020 at 12:00 AM"
data-tooltip="October 01, 2020, 12:00 AM"
>
<div
class="comment-date"
Expand Down Expand Up @@ -275,7 +275,7 @@ exports[`components/cardDetail/comment return comment readonly 1`] = `
</div>
<div
class="octo-tooltip tooltip-top"
data-tooltip="October 01, 2020 at 12:00 AM"
data-tooltip="October 01, 2020, 12:00 AM"
>
<div
class="comment-date"
Expand Down Expand Up @@ -323,7 +323,7 @@ exports[`components/cardDetail/comment return guest comment 1`] = `
</div>
<div
class="octo-tooltip tooltip-top"
data-tooltip="October 01, 2020 at 12:00 AM"
data-tooltip="October 01, 2020, 12:00 AM"
>
<div
class="comment-date"
Expand Down Expand Up @@ -460,7 +460,7 @@ exports[`components/cardDetail/comment return guest comment and delete comment 1
</div>
<div
class="octo-tooltip tooltip-top"
data-tooltip="October 01, 2020 at 12:00 AM"
data-tooltip="October 01, 2020, 12:00 AM"
>
<div
class="comment-date"
Expand Down Expand Up @@ -597,7 +597,7 @@ exports[`components/cardDetail/comment return guest comment readonly 1`] = `
</div>
<div
class="octo-tooltip tooltip-top"
data-tooltip="October 01, 2020 at 12:00 AM"
data-tooltip="October 01, 2020, 12:00 AM"
>
<div
class="comment-date"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`properties/updatedTime should match snapshot 1`] = `
<div
class="UpdatedTime octo-propertyvalue octo-propertyvalue--readonly"
>
June 15, 2021 at 4:22 PM
June 15, 2021, 4:22 PM
</div>
</div>
`;
4 changes: 2 additions & 2 deletions webapp/src/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,14 @@ describe('utils', () => {
const currentYear = new Date().getFullYear()
const date = new Date(currentYear, 6, 9, 15, 20)
const actual = Utils.displayDateTime(date, intl)
expect(actual).toBe('July 09 at 3:20 PM')
expect(actual).toBe('July 09, 3:20 PM')
})

it('should show month, day, year and time for previous year', () => {
const currentYear = new Date().getFullYear()
const previousYear = currentYear - 1
const date = new Date(previousYear, 6, 9, 5, 35)
expect(Utils.displayDateTime(date, intl)).toBe(`July 09, ${previousYear} at 5:35 AM`)
expect(Utils.displayDateTime(date, intl)).toBe(`July 09, ${previousYear}, 5:35 AM`)
})
})

Expand Down

0 comments on commit 3501411

Please sign in to comment.