Skip to content

Commit

Permalink
support node 19's \u202f break between time and AM/PM 😠
Browse files Browse the repository at this point in the history
  • Loading branch information
mceachen committed Jan 11, 2023
1 parent 097b0f7 commit 830ffb9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ExifDateTime.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ describe("ExifDateTime", () => {
expect(dt.toISOString()).to.eql(iso)
})
it("Renders a Date assuming the current timezone offset", () => {
expect(dt.toDate().toLocaleString("en-US")).to.eql(
"8/12/2016, 7:28:50 AM"
// Node 19 renders 8/12/2016, 7:28:50\u202fAM UGH
expect(dt.toDate().toLocaleString("en-US")).to.match(
/8\/12\/2016, 7:28:50\sAM/
)
})
it("Round-trips from ISO", () => {
Expand Down

0 comments on commit 830ffb9

Please sign in to comment.