Skip to content

Commit

Permalink
Added isoly export, updated tests to use it. (#108)
Browse files Browse the repository at this point in the history
* Added isoly export, updated tests to use it.

* Fixed vulnerably build dependencies.
  • Loading branch information
simonmika authored Mar 17, 2023
1 parent fee7a2b commit 770c537
Show file tree
Hide file tree
Showing 12 changed files with 1,783 additions and 1,524 deletions.
8 changes: 4 additions & 4 deletions CallingCode.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CallingCode } from "./CallingCode"
const commonlyUsedAreas: { [key: string]: CallingCode } = {
import { isoly } from "./index"
const commonlyUsedAreas: { [key: string]: isoly.CallingCode } = {
SE: "+46",
FI: "+358",
DE: "+49",
Expand All @@ -10,12 +10,12 @@ const commonlyUsedAreas: { [key: string]: CallingCode } = {
describe("CallingCode", () => {
it("seperate Swedish number", () => {
const phoneNumber = "+461570000000"
expect(CallingCode.seperate(phoneNumber)).toEqual(["+46", "1570000000"])
expect(isoly.CallingCode.seperate(phoneNumber)).toEqual(["+46", "1570000000"])
})
it("check common countries", () => {
for (const key in commonlyUsedAreas) {
const phoneNumber = commonlyUsedAreas[key] + "123456789"
expect(CallingCode.seperate(phoneNumber)).toEqual([commonlyUsedAreas[key], "123456789"])
expect(isoly.CallingCode.seperate(phoneNumber)).toEqual([commonlyUsedAreas[key], "123456789"])
}
})
})
170 changes: 85 additions & 85 deletions Currency.spec.ts
Original file line number Diff line number Diff line change
@@ -1,112 +1,112 @@
import { Currency } from "./Currency"
import { isoly } from "./index"

describe("Currency", () => {
it("undefined", () => {
expect(Currency.is(undefined)).toBeFalsy()
expect(isoly.Currency.is(undefined)).toBeFalsy()
})
it("check types array", () => {
expect(Currency.types.every(c => Currency.is(c))).toBeTruthy()
expect(Currency.is("SEK")).toBeTruthy()
expect(Currency.is("ZZZ")).toBeFalsy()
expect(isoly.Currency.types.every(c => isoly.Currency.is(c))).toBeTruthy()
expect(isoly.Currency.is("SEK")).toBeTruthy()
expect(isoly.Currency.is("ZZZ")).toBeFalsy()
})
it("round", () => {
expect(Currency.round(0.004755520000000001, "SEK")).toEqual(0)
expect(Currency.round(0.004999920000000001, "SEK")).toEqual(0)
expect(Currency.round(17999.204999999998, "SEK")).toEqual(17999.21) //correct
expect(Currency.round(0.005, "SEK")).toEqual(0.01)
expect(Currency.round(0.0049, "SEK")).toEqual(0.0)
expect(Currency.round(0.00499, "SEK")).toEqual(0.0)
expect(Currency.round(0.004999, "SEK")).toEqual(0.0)
expect(Currency.round(0.0049999, "SEK")).toEqual(0.0)
expect(Currency.round(0.00499999, "SEK")).toEqual(0.0)
expect(Currency.round(0.004999999, "SEK")).toEqual(0.01)
expect(Currency.round(0.004999981, "SEK")).toEqual(0.0)
expect(isoly.Currency.round(0.004755520000000001, "SEK")).toEqual(0)
expect(isoly.Currency.round(0.004999920000000001, "SEK")).toEqual(0)
expect(isoly.Currency.round(17999.204999999998, "SEK")).toEqual(17999.21) //correct
expect(isoly.Currency.round(0.005, "SEK")).toEqual(0.01)
expect(isoly.Currency.round(0.0049, "SEK")).toEqual(0.0)
expect(isoly.Currency.round(0.00499, "SEK")).toEqual(0.0)
expect(isoly.Currency.round(0.004999, "SEK")).toEqual(0.0)
expect(isoly.Currency.round(0.0049999, "SEK")).toEqual(0.0)
expect(isoly.Currency.round(0.00499999, "SEK")).toEqual(0.0)
expect(isoly.Currency.round(0.004999999, "SEK")).toEqual(0.01)
expect(isoly.Currency.round(0.004999981, "SEK")).toEqual(0.0)
})

it("add", () => {
expect(95.385 + 18.114 + 0.001).toEqual(113.50000000000001) //should be 113.5
expect(Currency.add("ISK", 95.385 + 18.114, 0.001)).toEqual(113)
expect(Currency.add("SEK", 95.385 + 18.114, 0.001)).toEqual(113.5)
expect(Currency.add("BHD", 95.385 + 18.114, 0.001)).toEqual(113.5)
expect(isoly.Currency.add("ISK", 95.385 + 18.114, 0.001)).toEqual(113)
expect(isoly.Currency.add("SEK", 95.385 + 18.114, 0.001)).toEqual(113.5)
expect(isoly.Currency.add("BHD", 95.385 + 18.114, 0.001)).toEqual(113.5)

expect(4.3 + 0.1 + 0.1).toEqual(4.499999999999999) //should be 4.5
expect(Currency.add("ISK", 0.1, 4.3 + 0.1)).toEqual(4)
expect(Currency.add("SEK", 0.1, 4.3 + 0.1)).toEqual(4.5)
expect(Currency.add("BHD", 0.1, 4.3 + 0.1)).toEqual(4.5)
expect(isoly.Currency.add("ISK", 0.1, 4.3 + 0.1)).toEqual(4)
expect(isoly.Currency.add("SEK", 0.1, 4.3 + 0.1)).toEqual(4.5)
expect(isoly.Currency.add("BHD", 0.1, 4.3 + 0.1)).toEqual(4.5)
})

it("divide", () => {
expect(2.1 / 0.6).toEqual(3.5000000000000004) //should be 3.5
expect(Currency.divide("ISK", 2.1, 0.6)).toEqual(3)
expect(Currency.divide("SEK", 2.1, 0.6)).toEqual(3.5)
expect(Currency.divide("BHD", 2.1, 0.6)).toEqual(3.5)
expect(isoly.Currency.divide("ISK", 2.1, 0.6)).toEqual(3)
expect(isoly.Currency.divide("SEK", 2.1, 0.6)).toEqual(3.5)
expect(isoly.Currency.divide("BHD", 2.1, 0.6)).toEqual(3.5)

expect(1.34 / 1.11).toEqual(1.207207207207207)
expect(Currency.divide("ISK", 1.34, 1.11)).toEqual(1)
expect(Currency.divide("SEK", 1.34, 1.11)).toEqual(1.21)
expect(Currency.divide("BHD", 1.34, 1.11)).toEqual(1.207)
expect(isoly.Currency.divide("ISK", 1.34, 1.11)).toEqual(1)
expect(isoly.Currency.divide("SEK", 1.34, 1.11)).toEqual(1.21)
expect(isoly.Currency.divide("BHD", 1.34, 1.11)).toEqual(1.207)

expect(95.55 / 0.1).toEqual(955.4999999999999) //should be 955.5
expect(Currency.divide("ISK", 95.55, 0.1)).toEqual(960)
expect(Currency.divide("SEK", 95.55, 0.1)).toEqual(955.5)
expect(Currency.divide("BHD", 95.55, 0.1)).toEqual(955.5)
expect(isoly.Currency.divide("ISK", 95.55, 0.1)).toEqual(960)
expect(isoly.Currency.divide("SEK", 95.55, 0.1)).toEqual(955.5)
expect(isoly.Currency.divide("BHD", 95.55, 0.1)).toEqual(955.5)
})

it("multiply", () => {
expect(2090.5 * 8.61).toEqual(17999.204999999998)
expect(Currency.multiply("ISK", 2090.5, 8.61)).toEqual(18004)
expect(Currency.multiply("SEK", 2090.5, 8.61)).toEqual(17999.21)
expect(Currency.multiply("BHD", 2090.5, 8.61)).toEqual(17999.205)
expect(isoly.Currency.multiply("ISK", 2090.5, 8.61)).toEqual(18004)
expect(isoly.Currency.multiply("SEK", 2090.5, 8.61)).toEqual(17999.21)
expect(isoly.Currency.multiply("BHD", 2090.5, 8.61)).toEqual(17999.205)

expect(50000 * 0.000001 * 1000).toEqual(49.99999999999999) //should be 50
expect(Currency.multiply("ISK", 1000, 0.000001 * 50000)).toEqual(50)
expect(Currency.multiply("SEK", 1000, 0.000001 * 50000)).toEqual(50)
expect(Currency.multiply("BHD", 1000, 0.000001 * 50000)).toEqual(50)
expect(isoly.Currency.multiply("ISK", 1000, 0.000001 * 50000)).toEqual(50)
expect(isoly.Currency.multiply("SEK", 1000, 0.000001 * 50000)).toEqual(50)
expect(isoly.Currency.multiply("BHD", 1000, 0.000001 * 50000)).toEqual(50)

expect(0.000001 * 50000 * 10).toEqual(0.49999999999999994) //should be 0.5
expect(Currency.multiply("ISK", 10, 0.000001 * 50000)).toEqual(1)
expect(Currency.multiply("SEK", 10, 0.000001 * 50000)).toEqual(0.5)
expect(Currency.multiply("BHD", 10, 0.000001 * 50000)).toEqual(0.5)
expect(isoly.Currency.multiply("ISK", 10, 0.000001 * 50000)).toEqual(1)
expect(isoly.Currency.multiply("SEK", 10, 0.000001 * 50000)).toEqual(0.5)
expect(isoly.Currency.multiply("BHD", 10, 0.000001 * 50000)).toEqual(0.5)

expect(0.000001 * 50000).toEqual(0.049999999999999996) //should be 0.05
expect(Currency.multiply("ISK", 50000, 0.000001)).toEqual(0)
expect(Currency.multiply("SEK", 50000, 0.000001)).toEqual(0.05)
expect(Currency.multiply("BHD", 50000, 0.000001)).toEqual(0.05)
expect(isoly.Currency.multiply("ISK", 50000, 0.000001)).toEqual(0)
expect(isoly.Currency.multiply("SEK", 50000, 0.000001)).toEqual(0.05)
expect(isoly.Currency.multiply("BHD", 50000, 0.000001)).toEqual(0.05)

expect(0.1 * 1.5 * 10).toEqual(1.5000000000000002) //should be 1.5
expect(Currency.multiply("ISK", 10, 0.1 * 1.5)).toEqual(2)
expect(Currency.multiply("SEK", 10, 0.1 * 1.5)).toEqual(1.5)
expect(Currency.multiply("BHD", 10, 0.1 * 1.5)).toEqual(1.5)
expect(isoly.Currency.multiply("ISK", 10, 0.1 * 1.5)).toEqual(2)
expect(isoly.Currency.multiply("SEK", 10, 0.1 * 1.5)).toEqual(1.5)
expect(isoly.Currency.multiply("BHD", 10, 0.1 * 1.5)).toEqual(1.5)

expect(0.1 * 1.5).toEqual(0.15000000000000002) //should be 0.15
expect(Currency.multiply("ISK", 0.1, 1.5)).toEqual(0)
expect(Currency.multiply("SEK", 0.1, 1.5)).toEqual(0.15)
expect(Currency.multiply("BHD", 0.1, 1.5)).toEqual(0.15)
expect(isoly.Currency.multiply("ISK", 0.1, 1.5)).toEqual(0)
expect(isoly.Currency.multiply("SEK", 0.1, 1.5)).toEqual(0.15)
expect(isoly.Currency.multiply("BHD", 0.1, 1.5)).toEqual(0.15)

expect(0.1 * 1.5).toEqual(0.15000000000000002) //should be 0.15
expect(Currency.multiply("SEK", 0.1, 1.5, "ISK")).toEqual(0)
expect(Currency.multiply("SEK", 0.1, 1.5, "SEK")).toEqual(0.15)
expect(Currency.multiply("SEK", 0.1, 1.5, "BHD")).toEqual(0.15)
expect(isoly.Currency.multiply("SEK", 0.1, 1.5, "ISK")).toEqual(0)
expect(isoly.Currency.multiply("SEK", 0.1, 1.5, "SEK")).toEqual(0.15)
expect(isoly.Currency.multiply("SEK", 0.1, 1.5, "BHD")).toEqual(0.15)
})
it("subtract", () => {
expect(1.4 - 0.9).toEqual(0.4999999999999999) //should be 0.5
expect(Currency.subtract("ISK", 1.4, 0.9)).toEqual(0)
expect(Currency.subtract("SEK", 1.4, 0.9)).toEqual(0.5)
expect(Currency.subtract("BHD", 1.4, 0.9)).toEqual(0.5)
expect(isoly.Currency.subtract("ISK", 1.4, 0.9)).toEqual(0)
expect(isoly.Currency.subtract("SEK", 1.4, 0.9)).toEqual(0.5)
expect(isoly.Currency.subtract("BHD", 1.4, 0.9)).toEqual(0.5)

expect(16.4 - 0.9).toEqual(15.499999999999998) //should be 15.5
expect(Currency.subtract("ISK", 16.4, 0.9)).toEqual(15)
expect(Currency.subtract("SEK", 16.4, 0.9)).toEqual(15.5)
expect(Currency.subtract("BHD", 16.4, 0.9)).toEqual(15.5)
expect(isoly.Currency.subtract("ISK", 16.4, 0.9)).toEqual(15)
expect(isoly.Currency.subtract("SEK", 16.4, 0.9)).toEqual(15.5)
expect(isoly.Currency.subtract("BHD", 16.4, 0.9)).toEqual(15.5)

expect(76.9 - 21.4).toEqual(55.50000000000001) //should be 55.5
expect(Currency.subtract("ISK", 76.9, 21.4)).toEqual(56)
expect(Currency.subtract("SEK", 76.9, 21.4)).toEqual(55.5)
expect(Currency.subtract("BHD", 76.9, 21.4)).toEqual(55.5)
expect(isoly.Currency.subtract("ISK", 76.9, 21.4)).toEqual(56)
expect(isoly.Currency.subtract("SEK", 76.9, 21.4)).toEqual(55.5)
expect(isoly.Currency.subtract("BHD", 76.9, 21.4)).toEqual(55.5)
})
it("sum", () => {
function addUp(amounts: number[]): number {
return amounts.reduce((sum, amount) => Currency.add("EUR", amount, sum), 0)
return amounts.reduce((sum, amount) => isoly.Currency.add("EUR", amount, sum), 0)
}
expect(addUp([10.42, 3.01])).toEqual(13.43)
expect(addUp([10.4, 3.03])).toEqual(13.43)
Expand All @@ -123,30 +123,30 @@ describe("Currency", () => {
expect(addUp([-0.01, 0.02, 0.55, 0.14])).toEqual(0.7)
})
it("toMinor", () => {
expect(Currency.toMinor(0.004755520000000001, "SEK")).toEqual(0)
expect(Currency.toMinor(0.004999920000000001, "SEK")).toEqual(0)
expect(Currency.toMinor(0, "SEK")).toEqual(0)
expect(Currency.toMinor(0.01, "SEK")).toEqual(1)
expect(Currency.toMinor(0.02, "SEK")).toEqual(2)
expect(Currency.toMinor(0.049, "SEK")).toEqual(5)
expect(Currency.toMinor(0.0501, "SEK")).toEqual(5)
expect(Currency.toMinor(3.05, "SEK")).toEqual(305)
expect(Currency.toMinor(0.5, "SEK")).toEqual(50)
expect(Currency.toMinor(0.2, "ISK")).toEqual(0)
expect(Currency.toMinor(400.2, "ISK")).toEqual(400)
expect(Currency.toMinor(400, "ISK")).toEqual(400)
expect(Currency.toMinor(123.456, "XPT")).toEqual(123.456)
expect(isoly.Currency.toMinor(0.004755520000000001, "SEK")).toEqual(0)
expect(isoly.Currency.toMinor(0.004999920000000001, "SEK")).toEqual(0)
expect(isoly.Currency.toMinor(0, "SEK")).toEqual(0)
expect(isoly.Currency.toMinor(0.01, "SEK")).toEqual(1)
expect(isoly.Currency.toMinor(0.02, "SEK")).toEqual(2)
expect(isoly.Currency.toMinor(0.049, "SEK")).toEqual(5)
expect(isoly.Currency.toMinor(0.0501, "SEK")).toEqual(5)
expect(isoly.Currency.toMinor(3.05, "SEK")).toEqual(305)
expect(isoly.Currency.toMinor(0.5, "SEK")).toEqual(50)
expect(isoly.Currency.toMinor(0.2, "ISK")).toEqual(0)
expect(isoly.Currency.toMinor(400.2, "ISK")).toEqual(400)
expect(isoly.Currency.toMinor(400, "ISK")).toEqual(400)
expect(isoly.Currency.toMinor(123.456, "XPT")).toEqual(123.456)
})
it("fromMinor", () => {
expect(Currency.fromMinor(0, "SEK")).toEqual(0)
expect(Currency.fromMinor(1, "SEK")).toEqual(0.01)
expect(Currency.fromMinor(2, "SEK")).toEqual(0.02)
expect(Currency.fromMinor(5, "SEK")).toEqual(0.05)
expect(Currency.fromMinor(5, "SEK")).toEqual(0.05)
expect(Currency.fromMinor(305, "SEK")).toEqual(3.05)
expect(Currency.fromMinor(50, "SEK")).toEqual(0.5)
expect(Currency.fromMinor(0, "ISK")).toEqual(0)
expect(Currency.fromMinor(400, "ISK")).toEqual(400)
expect(Currency.fromMinor(123.456, "XPT")).toEqual(123.456)
expect(isoly.Currency.fromMinor(0, "SEK")).toEqual(0)
expect(isoly.Currency.fromMinor(1, "SEK")).toEqual(0.01)
expect(isoly.Currency.fromMinor(2, "SEK")).toEqual(0.02)
expect(isoly.Currency.fromMinor(5, "SEK")).toEqual(0.05)
expect(isoly.Currency.fromMinor(5, "SEK")).toEqual(0.05)
expect(isoly.Currency.fromMinor(305, "SEK")).toEqual(3.05)
expect(isoly.Currency.fromMinor(50, "SEK")).toEqual(0.5)
expect(isoly.Currency.fromMinor(0, "ISK")).toEqual(0)
expect(isoly.Currency.fromMinor(400, "ISK")).toEqual(400)
expect(isoly.Currency.fromMinor(123.456, "XPT")).toEqual(123.456)
})
})
10 changes: 5 additions & 5 deletions CurrencyCode.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { CurrencyCode } from "./CurrencyCode"
import { isoly } from "./index"

describe("CurrencyCode", () => {
it("undefined", () => {
expect(CurrencyCode.is(undefined)).toBeFalsy()
expect(isoly.CurrencyCode.is(undefined)).toBeFalsy()
})
it("check types array", () => {
expect(CurrencyCode.types.every(c => CurrencyCode.is(c))).toBeTruthy()
expect(CurrencyCode.is("752")).toBeTruthy()
expect(CurrencyCode.is("000")).toBeFalsy()
expect(isoly.CurrencyCode.types.every(c => isoly.CurrencyCode.is(c))).toBeTruthy()
expect(isoly.CurrencyCode.is("752")).toBeTruthy()
expect(isoly.CurrencyCode.is("000")).toBeFalsy()
})
})
29 changes: 15 additions & 14 deletions DateRange.spec.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
import { DateRange } from "./DateRange"
import { isoly } from "./index"

describe("DateRange", () => {
it("create Date + Date", () => {
expect(DateRange.create("2021-01-01", "2020-01-01")).toEqual({ start: "2020-01-01", end: "2021-01-01" })
expect(isoly.DateRange.create("2021-01-01", "2020-01-01")).toEqual({ start: "2020-01-01", end: "2021-01-01" })
})
it("create Date + DateSpan", () => {
expect(DateRange.create("2001-01-01", { years: 1, months: 2, days: 3 })).toEqual({
expect(isoly.DateRange.create("2001-01-01", { years: 1, months: 2, days: 3 })).toEqual({
start: "2001-01-01",
end: "2002-03-04",
})
})
it("create Date - DateSpan", () => {
expect(DateRange.create("2001-01-01", { years: -1, months: -1, days: -1 })).toEqual({
expect(isoly.DateRange.create("2001-01-01", { years: -1, months: -1, days: -1 })).toEqual({
start: "1999-11-30",
end: "2001-01-01",
})
})
it("toDates", () => {
expect(DateRange.toDates({ start: "2022-04-30", end: "2022-05-10" })).toEqual([
expect(isoly.DateRange.toDates({ start: "2022-04-30", end: "2022-05-10" })).toEqual([
"2022-04-30",
"2022-05-01",
"2022-05-02",
Expand All @@ -29,11 +30,11 @@ describe("DateRange", () => {
"2022-05-09",
"2022-05-10",
])
expect(DateRange.toDates({ start: "2022-04-30", end: "2022-04-30" })).toEqual(["2022-04-30"])
expect(DateRange.toDates({ start: "2022-05-20", end: "2022-04-30" })).toEqual([])
expect(isoly.DateRange.toDates({ start: "2022-04-30", end: "2022-04-30" })).toEqual(["2022-04-30"])
expect(isoly.DateRange.toDates({ start: "2022-05-20", end: "2022-04-30" })).toEqual([])
})
it("toDates don't includeLast", () => {
expect(DateRange.toDates({ start: "2022-04-30", end: "2022-05-10" }, false)).toEqual([
expect(isoly.DateRange.toDates({ start: "2022-04-30", end: "2022-05-10" }, false)).toEqual([
"2022-04-30",
"2022-05-01",
"2022-05-02",
Expand All @@ -45,13 +46,13 @@ describe("DateRange", () => {
"2022-05-08",
"2022-05-09",
])
expect(DateRange.toDates({ start: "2022-04-30", end: "2022-04-30" }, false)).toEqual([])
expect(DateRange.toDates({ start: "2022-04-30", end: "2022-05-01" }, false)).toEqual(["2022-04-30"])
expect(DateRange.toDates({ start: "2022-05-20", end: "2022-04-30" }, false)).toEqual([])
expect(isoly.DateRange.toDates({ start: "2022-04-30", end: "2022-04-30" }, false)).toEqual([])
expect(isoly.DateRange.toDates({ start: "2022-04-30", end: "2022-05-01" }, false)).toEqual(["2022-04-30"])
expect(isoly.DateRange.toDates({ start: "2022-05-20", end: "2022-04-30" }, false)).toEqual([])
})
it("getDays", () => {
expect(DateRange.getDays({ start: "2022-04-30", end: "2022-05-20" })).toEqual(20)
expect(DateRange.getDays({ start: "2022-04-30", end: "2022-04-30" })).toEqual(0)
expect(DateRange.getDays({ start: "2022-05-20", end: "2022-04-30" })).toEqual(-20)
expect(isoly.DateRange.getDays({ start: "2022-04-30", end: "2022-05-20" })).toEqual(20)
expect(isoly.DateRange.getDays({ start: "2022-04-30", end: "2022-04-30" })).toEqual(0)
expect(isoly.DateRange.getDays({ start: "2022-05-20", end: "2022-04-30" })).toEqual(-20)
})
})
10 changes: 5 additions & 5 deletions DateTime.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as isoly from "./index"
import { isoly } from "./index"

describe("DateTime", () => {
it("undefined", () => {
Expand Down Expand Up @@ -106,14 +106,14 @@ describe("DateTime", () => {
expect(isoly.DateTime.localize(new Date(date[0])).split(" ")[1]).toEqual(date[1])
)
it("localize DateTime with locale", () => {
expect(isoly.DateTime.localize("2020-12-31T23:59:59.000Z", "en-US")).toEqual("01/01/2021, 12:59:59 AM")
expect(isoly.DateTime.localize("2020-12-31T23:59:59.000Z", "en-US")).toEqual("01/01/2021, 12:59:59AM")
})

it("localize 2020-12-31T23:59Z to en-US", () => {
expect(isoly.DateTime.localize("2020-12-31T23:59Z", "en-US")).toEqual("01/01/2021, 12:59 AM")
expect(isoly.DateTime.localize("2020-12-31T23:59Z", "en-US")).toEqual("01/01/2021, 12:59AM")
})
it("localize 2020-12-31T23Z to en-US", () => {
expect(isoly.DateTime.localize("2020-12-31T23Z", "en-US")).toEqual("01/01/2021, 12 AM")
expect(isoly.DateTime.localize("2020-12-31T23Z", "en-US")).toEqual("01/01/2021, 12AM")
})
it('localize 2020-12-31T23:12Z to en-US { month: "short", day: "numeric", hour: "numeric", minute: "numeric" }', () => {
expect(
Expand All @@ -122,7 +122,7 @@ describe("DateTime", () => {
{ month: "short", day: "numeric", hour: "numeric", minute: "numeric" },
"en-US"
)
).toEqual("Jan 1, 12:12 AM")
).toEqual("Jan 1, 12:12AM")
})
it('localize 2020-12-31T23:12Z to de-DE { month: "short", day: "numeric", hour: "numeric", minute: "numeric" }', () => {
expect(
Expand Down
Loading

0 comments on commit 770c537

Please sign in to comment.