-
Notifications
You must be signed in to change notification settings - Fork 461
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Temporal: Converting Demitasse PDT.round tests
- Loading branch information
1 parent
833a784
commit 31b28d8
Showing
15 changed files
with
395 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
test/built-ins/Temporal/PlainDateTime/prototype/round/balance.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (C) 2022 Igalia, S.L. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-temporal.plaindatetime.prototype.round | ||
description: Rounding balances to the next smallest unit | ||
features: [Temporal] | ||
includes: [temporalHelpers.js] | ||
---*/ | ||
|
||
const dt = new Temporal.PlainDateTime(1976, 11, 18, 23, 59, 59, 999, 999, 999); | ||
|
||
["day", "hour", "minute", "second", "millisecond", "microsecond"].forEach((smallestUnit) => { | ||
TemporalHelpers.assertPlainDateTime( | ||
dt.round({ smallestUnit }), | ||
1976, 11, "M11", 19, 0, 0, 0, 0, 0, 0, | ||
`balances to next ${smallestUnit}` | ||
); | ||
}); |
36 changes: 36 additions & 0 deletions
36
test/built-ins/Temporal/PlainDateTime/prototype/round/round-toward-big-bang.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright (C) 2022 Igalia, S.L. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-temporal.plaindatetime.prototype.round | ||
description: Round down towards the Big Bang rather than 1 BCE | ||
features: [Temporal] | ||
includes: [temporalHelpers.js] | ||
---*/ | ||
|
||
const dt = new Temporal.PlainDateTime(-99, 12, 15, 12, 0, 0, 500); | ||
const smallestUnit = "second"; | ||
|
||
TemporalHelpers.assertPlainDateTime( | ||
dt.round({ smallestUnit, roundingMode: "ceil" }), | ||
-99, 12, "M12", 15, 12, 0, 1, 0, 0, 0, | ||
"rounding down is towards the Big Bang, not towards 1 BCE (rounding mode = ceil)" | ||
); | ||
|
||
TemporalHelpers.assertPlainDateTime( | ||
dt.round({ smallestUnit, roundingMode: "floor" }), | ||
-99, 12, "M12", 15, 12, 0, 0, 0, 0, 0, | ||
"rounding down is towards the Big Bang, not towards 1 BCE (rounding mode = floor)" | ||
); | ||
|
||
TemporalHelpers.assertPlainDateTime( | ||
dt.round({ smallestUnit, roundingMode: "trunc" }), | ||
-99, 12, "M12", 15, 12, 0, 0, 0, 0, 0, | ||
"rounding down is towards the Big Bang, not towards 1 BCE (rounding mode = trunc)" | ||
); | ||
|
||
TemporalHelpers.assertPlainDateTime( | ||
dt.round({ smallestUnit, roundingMode: "halfExpand" }), | ||
-99, 12, "M12", 15, 12, 0, 1, 0, 0, 0, | ||
"rounding down is towards the Big Bang, not towards 1 BCE (rounding mode = half-expand)" | ||
); |
53 changes: 53 additions & 0 deletions
53
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingincrement-divides.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// Copyright (C) 2022 Igalia, S.L. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-temporal.plaindatetime.prototype.round | ||
description: Rounding increment should properly divide the relevant time unit | ||
features: [Temporal] | ||
---*/ | ||
|
||
const dt = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 456, 789); | ||
|
||
[1, 2, 3, 4, 6, 8, 12].forEach((roundingIncrement) => { | ||
assert.sameValue( | ||
dt.round({ smallestUnit: "hour", roundingIncrement }) instanceof Temporal.PlainDateTime, | ||
true, | ||
`valid hour increments divide into 24 (rounding increment = ${roundingIncrement})`); | ||
}); | ||
|
||
["minute", "second"].forEach((smallestUnit) => { | ||
[1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30].forEach((roundingIncrement) => { | ||
assert.sameValue( | ||
dt.round({ smallestUnit, roundingIncrement }) instanceof Temporal.PlainDateTime, | ||
true, | ||
`valid ${smallestUnit} increments divide into 60 (rounding increment = ${roundingIncrement})` | ||
); | ||
}); | ||
}); | ||
|
||
["millisecond", "microsecond", "nanosecond"].forEach((smallestUnit) => { | ||
[1, 2, 4, 5, 8, 10, 20, 25, 40, 50, 100, 125, 200, 250, 500].forEach((roundingIncrement) => { | ||
assert.sameValue( | ||
dt.round({ smallestUnit, roundingIncrement }) instanceof Temporal.PlainDateTime, | ||
true, | ||
`valid ${smallestUnit} increments divide into 1000 (rounding increment = ${roundingIncrement})`); | ||
}); | ||
}); | ||
|
||
const nextIncrements = { | ||
"hour": 24, | ||
"minute": 60, | ||
"second": 60, | ||
"millisecond": 1000, | ||
"microsecond": 1000, | ||
"nanosecond": 1000 | ||
}; | ||
|
||
Object.entries(nextIncrements).forEach(([unit, next]) => { | ||
assert.throws( | ||
RangeError, | ||
() => dt.round({ smallestUnit: unit, roundingIncrement: next }), | ||
`throws on increments that are equal to the next highest (unit = ${unit}, increment = ${next})` | ||
); | ||
}); |
18 changes: 18 additions & 0 deletions
18
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingincrement-does-not-divide.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (C) 2022 Igalia, S.L. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-temporal.plaindatetime.prototype.round | ||
description: Throw exception if the rounding unit does not properly divide the relevant time unit | ||
features: [Temporal] | ||
---*/ | ||
|
||
const dt = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 456, 789); | ||
const units = ["day", "hour", "minute", "second", "millisecond", "microsecond", "nanosecond"]; | ||
units.forEach((unit) => { | ||
assert.throws( | ||
RangeError, | ||
() => dt.round({ smallestUnit: unit, roundingIncrement: 29 }), | ||
`throws on increments that do not divide evenly into the next highest (unit = ${unit})` | ||
); | ||
}); |
17 changes: 17 additions & 0 deletions
17
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingincrement-one-day.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright (C) 2022 Igalia, S.L. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-temporal.plaindatetime.prototype.round | ||
description: One day is a valid rounding increment | ||
features: [Temporal] | ||
includes: [temporalHelpers.js] | ||
---*/ | ||
|
||
const dt = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 456, 789); | ||
|
||
TemporalHelpers.assertPlainDateTime( | ||
dt.round({ smallestUnit: "day", roundingIncrement: 1 }), | ||
1976, 11, "M11", 19, 0, 0, 0, 0, 0, 0, | ||
"1 day is a valid increment" | ||
); |
47 changes: 47 additions & 0 deletions
47
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-basic.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Copyright (C) 2022 Igalia, S.L. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-temporal.plaindatetime.prototype.round | ||
description: Basic checks for rounding mode | ||
features: [Temporal] | ||
includes: [temporalHelpers.js] | ||
---*/ | ||
|
||
const dt = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 456, 789); | ||
|
||
TemporalHelpers.assertPlainDateTime( | ||
dt.round({ smallestUnit: "hour", roundingIncrement: 4 }), | ||
1976, 11, "M11", 18, 16, 0, 0, 0, 0, 0, | ||
"rounds to an increment of hours" | ||
); | ||
|
||
TemporalHelpers.assertPlainDateTime( | ||
dt.round({ smallestUnit: "minute", roundingIncrement: 15 }), | ||
1976, 11, "M11", 18, 14, 30, 0, 0, 0, 0, | ||
"rounds to an increment of minutes" | ||
); | ||
|
||
TemporalHelpers.assertPlainDateTime( | ||
dt.round({ smallestUnit: "second", roundingIncrement: 30 }), | ||
1976, 11, "M11", 18, 14, 23, 30, 0, 0, 0, | ||
"rounds to an increment of seconds" | ||
); | ||
|
||
TemporalHelpers.assertPlainDateTime( | ||
dt.round({ smallestUnit: "millisecond", roundingIncrement: 10 }), | ||
1976, 11, "M11", 18, 14, 23, 30, 120, 0, 0, | ||
"rounds to an increment of milliseconds" | ||
); | ||
|
||
TemporalHelpers.assertPlainDateTime( | ||
dt.round({ smallestUnit: "microsecond", roundingIncrement: 10 }), | ||
1976, 11, "M11", 18, 14, 23, 30, 123, 460, 0, | ||
"rounds to an increment of microseconds" | ||
); | ||
|
||
TemporalHelpers.assertPlainDateTime( | ||
dt.round({ smallestUnit: "nanosecond", roundingIncrement: 10 }), | ||
1976, 11, "M11", 18, 14, 23, 30, 123, 456, 790, | ||
"rounds to an increment of nanoseconds" | ||
); |
30 changes: 30 additions & 0 deletions
30
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-ceil-basic.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright (C) 2022 Igalia, S.L. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-temporal.plaindatetime.prototype.round | ||
description: Basic checks for ceiling rounding mode | ||
features: [Temporal] | ||
includes: [temporalHelpers.js] | ||
---*/ | ||
|
||
const dt = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 456, 789); | ||
|
||
const incrementOneCeil = { | ||
"day": [1976, 11, "M11", 19, 0, 0, 0, 0, 0, 0, 0], | ||
"hour": [1976, 11, "M11", 18, 15, 0, 0, 0, 0, 0, 0], | ||
"minute": [1976, 11, "M11", 18, 14, 24, 0, 0, 0, 0], | ||
"second": [1976, 11, "M11", 18, 14, 23, 31, 0, 0, 0], | ||
"millisecond": [1976, 11, "M11", 18, 14, 23, 30, 124, 0, 0], | ||
"microsecond": [1976, 11, "M11", 18, 14, 23, 30, 123, 457, 0], | ||
"nanosecond": [1976, 11, "M11", 18, 14, 23, 30, 123, 456, 789] | ||
}; | ||
|
||
Object.entries(incrementOneCeil).forEach(([smallestUnit, expected]) => { | ||
const [y, mon, code, d, h, min, s, ms, µs, ns] = expected; | ||
TemporalHelpers.assertPlainDateTime( | ||
dt.round({ smallestUnit, roundingMode: "ceil" }), | ||
y, mon, code, d, h, min, s, ms, µs, ns, | ||
`rounds up to ${smallestUnit} (ceil)` | ||
); | ||
}); |
30 changes: 30 additions & 0 deletions
30
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-floor-basic.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright (C) 2022 Igalia, S.L. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-temporal.plaindatetime.prototype.round | ||
description: Basic checks for the floor rounding mode | ||
features: [Temporal] | ||
includes: [temporalHelpers.js] | ||
---*/ | ||
|
||
const dt = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 456, 789); | ||
|
||
const incrementOneFloor = { | ||
"day": [1976, 11, "M11", 18, 0, 0, 0, 0, 0, 0, 0], | ||
"hour": [1976, 11, "M11", 18, 14, 0, 0, 0, 0, 0, 0], | ||
"minute": [1976, 11, "M11", 18, 14, 23, 0, 0, 0, 0], | ||
"second": [1976, 11, "M11", 18, 14, 23, 30, 0, 0, 0], | ||
"millisecond": [1976, 11, "M11", 18, 14, 23, 30, 123, 0, 0], | ||
"microsecond": [1976, 11, "M11", 18, 14, 23, 30, 123, 456, 0], | ||
"nanosecond": [1976, 11, "M11", 18, 14, 23, 30, 123, 456, 789] | ||
}; | ||
|
||
Object.entries(incrementOneFloor).forEach(([smallestUnit, expected]) => { | ||
const [y, mon, code, d, h, min, s, ms, µs, ns] = expected; | ||
TemporalHelpers.assertPlainDateTime( | ||
dt.round({ smallestUnit, roundingMode: "floor" }), | ||
y, mon, code, d, h, min, s, ms, µs, ns, | ||
`rounds down to ${smallestUnit} (floor)` | ||
); | ||
}); |
30 changes: 30 additions & 0 deletions
30
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-halfexpand-basic.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright (C) 2022 Igalia, S.L. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-temporal.plaindatetime.prototype.round | ||
description: Basic checks for half-expand rounding mode | ||
features: [Temporal] | ||
includes: [temporalHelpers.js] | ||
---*/ | ||
|
||
const dt = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 456, 789); | ||
|
||
const incrementOneNearest = { | ||
"day": [1976, 11, "M11", 19, 0, 0, 0, 0, 0, 0, 0], | ||
"hour": [1976, 11, "M11", 18, 14, 0, 0, 0, 0, 0, 0], | ||
"minute": [1976, 11, "M11", 18, 14, 24, 0, 0, 0, 0], | ||
"second": [1976, 11, "M11", 18, 14, 23, 30, 0, 0, 0], | ||
"millisecond": [1976, 11, "M11", 18, 14, 23, 30, 123, 0, 0], | ||
"microsecond": [1976, 11, "M11", 18, 14, 23, 30, 123, 457, 0], | ||
"nanosecond": [1976, 11, "M11", 18, 14, 23, 30, 123, 456, 789] | ||
}; | ||
|
||
Object.entries(incrementOneNearest).forEach(([smallestUnit, expected]) => { | ||
const [y, mon, code, d, h, min, s, ms, µs, ns] = expected; | ||
TemporalHelpers.assertPlainDateTime( | ||
dt.round({ smallestUnit, roundingMode: "halfExpand" }), | ||
y, mon, code, d, h, min, s, ms, µs, ns, | ||
`rounds to nearest ${smallestUnit} (half-expand)` | ||
); | ||
}); |
21 changes: 21 additions & 0 deletions
21
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-halfexpand-is-default.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright (C) 2022 Igalia, S.L. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-temporal.plaindatetime.prototype.round | ||
description: Half-expand is the default rounding mode | ||
features: [Temporal] | ||
includes: [temporalHelpers.js] | ||
---*/ | ||
|
||
const dt = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 456, 789); | ||
|
||
const units = ["day", "hour", "minute", "second", "millisecond", "microsecond", "nanosecond"]; | ||
|
||
units.forEach((unit) => { | ||
TemporalHelpers.assertPlainDateTimesEqual( | ||
dt.round({ roundingmode: "halfExpand", smallestUnit: unit }), | ||
dt.round({ smallestUnit: unit }), | ||
`halfExpand is the default (smallest unit = ${unit})` | ||
); | ||
}); |
30 changes: 30 additions & 0 deletions
30
test/built-ins/Temporal/PlainDateTime/prototype/round/roundingmode-trunc-basic.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright (C) 2022 Igalia, S.L. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-temporal.plaindatetime.prototype.round | ||
description: Basic checks for truncation rounding mode | ||
features: [Temporal] | ||
includes: [temporalHelpers.js] | ||
---*/ | ||
|
||
const dt = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 456, 789); | ||
|
||
const incrementOneFloor = { | ||
"day": [1976, 11, "M11", 18, 0, 0, 0, 0, 0, 0, 0], | ||
"hour": [1976, 11, "M11", 18, 14, 0, 0, 0, 0, 0, 0], | ||
"minute": [1976, 11, "M11", 18, 14, 23, 0, 0, 0, 0], | ||
"second": [1976, 11, "M11", 18, 14, 23, 30, 0, 0, 0], | ||
"millisecond": [1976, 11, "M11", 18, 14, 23, 30, 123, 0, 0], | ||
"microsecond": [1976, 11, "M11", 18, 14, 23, 30, 123, 456, 0], | ||
"nanosecond": [1976, 11, "M11", 18, 14, 23, 30, 123, 456, 789] | ||
}; | ||
|
||
Object.entries(incrementOneFloor).forEach(([smallestUnit, expected]) => { | ||
const [y, mon, code, d, h, min, s, ms, µs, ns] = expected; | ||
TemporalHelpers.assertPlainDateTime( | ||
dt.round({ smallestUnit, roundingMode: "trunc" }), | ||
y, mon, code, d, h, min, s, ms, µs, ns, | ||
`truncates to ${smallestUnit}` | ||
); | ||
}); |
16 changes: 16 additions & 0 deletions
16
...lt-ins/Temporal/PlainDateTime/prototype/round/throws-argument-object-insufficient-data.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright (C) 2022 Igalia, S.L. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-temporal.plaindatetime.prototype.round | ||
description: Throw if smallest unit is missing from argument | ||
features: [Temporal] | ||
---*/ | ||
|
||
const dt = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 456, 789); | ||
|
||
assert.throws( | ||
RangeError, | ||
() => dt.round({ roundingIncrement: 1, roundingMode: "ceil" }), | ||
"throws without required smallestUnit parameter" | ||
); |
16 changes: 16 additions & 0 deletions
16
test/built-ins/Temporal/PlainDateTime/prototype/round/throws-argument-object.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright (C) 2022 Igalia, S.L. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-temporal.plaindatetime.prototype.round | ||
description: Throw if argument is an empty plain object | ||
features: [Temporal] | ||
---*/ | ||
|
||
const dt = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 456, 789); | ||
|
||
assert.throws( | ||
RangeError, | ||
() => dt.round({}), | ||
"throws on empty object" | ||
); |
16 changes: 16 additions & 0 deletions
16
test/built-ins/Temporal/PlainDateTime/prototype/round/throws-no-argument.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright (C) 2022 Igalia, S.L. All rights reserved. | ||
// This code is governed by the BSD license found in the LICENSE file. | ||
|
||
/*--- | ||
esid: sec-temporal.plaindatetime.prototype.round | ||
description: Throw if no arguments at all are given | ||
features: [Temporal] | ||
---*/ | ||
|
||
const dt = new Temporal.PlainDateTime(1976, 11, 18, 14, 23, 30, 123, 456, 789); | ||
|
||
assert.throws( | ||
TypeError, | ||
() => dt.round(), | ||
"throws without any parameters" | ||
); |
Oops, something went wrong.