Bug 1913305 - Add test. r=mtigley
[gecko.git] / js / src / tests / test262 / built-ins / Temporal / PlainDateTime / prototype / since / argument-object.js
blob57b3654f02ed0387176b01556164aaa9ea1f4425
1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
2 // Copyright (C) 2022 Igalia, S.L. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
5 /*---
6 esid: sec-temporal.plaindatetime.prototype.since
7 description: Plain objects are accepted as an argument
8 includes: [temporalHelpers.js]
9 features: [Temporal]
10 ---*/
12 const dt = new Temporal.PlainDateTime(1976, 11, 18, 15, 23, 30, 123, 456, 789);
14 TemporalHelpers.assertDuration(
15   dt.since({ year: 2019, month: 10, day: 29, hour: 10 }),
16   0, 0, 0, -15684, -18, -36, -29, -876, -543, -211,
17   "casts argument (plain object)"
20 reportCompare(0, 0);