From bc566c8f2e07475e86a2889169498f98a1e6f2e1 Mon Sep 17 00:00:00 2001 From: dobon Date: Thu, 5 Dec 2024 05:09:34 -0800 Subject: [PATCH] fix test --- test/datetime/format.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/datetime/format.test.js b/test/datetime/format.test.js index c824d18a..6787dfd0 100644 --- a/test/datetime/format.test.js +++ b/test/datetime/format.test.js @@ -272,7 +272,7 @@ test("DateTime#toISOTime({precision}) truncates time to desired precision", () = test("DateTime#toISOTime({precision}) throws when the precision is invalid", () => { expect(() => dt.toISOTime({ precision: "ms" })).toThrow(InvalidUnitError); expect(() => dt.toISOTime({ precision: "xxx" })).toThrow(InvalidUnitError); - expect(() => dt.toISOTime({ precision: null })).toThrow(InvalidUnitError); + expect(() => dt.toISOTime({ precision: null })).toThrow(TypeError); expect(() => dt.toISOTime({ precision: "days" })).toThrow(InvalidUnitError); expect(() => dt.toISOTime({ precision: "months" })).toThrow(InvalidUnitError); expect(() => dt.toISOTime({ precision: "years" })).toThrow(InvalidUnitError);