mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 05:55:36 +02:00
Test singular units in PlainDate#{add,subtract}.
This commit is contained in:
parent
00b9691218
commit
f768a24ab6
13
test/built-ins/Temporal/PlainDate/prototype/add/argument-singular-units.js
vendored
Normal file
13
test/built-ins/Temporal/PlainDate/prototype/add/argument-singular-units.js
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
// 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.plaindate.prototype.add
|
||||||
|
description: Ignores singular properties
|
||||||
|
includes: [temporalHelpers.js]
|
||||||
|
features: [Temporal]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
const date = Temporal.PlainDate.from("2019-11-18");
|
||||||
|
TemporalHelpers.assertPlainDate(date.add({ month: 1, days: 1 }),
|
||||||
|
2019, 11, "M11", 19);
|
13
test/built-ins/Temporal/PlainDate/prototype/subtract/argument-singular-units.js
vendored
Normal file
13
test/built-ins/Temporal/PlainDate/prototype/subtract/argument-singular-units.js
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
// 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.plaindate.prototype.subtract
|
||||||
|
description: Ignores singular properties
|
||||||
|
includes: [temporalHelpers.js]
|
||||||
|
features: [Temporal]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
const date = Temporal.PlainDate.from("2019-11-18");
|
||||||
|
TemporalHelpers.assertPlainDate(date.subtract({ month: 1, days: 1 }),
|
||||||
|
2019, 11, "M11", 17);
|
Loading…
x
Reference in New Issue
Block a user