blob: ca9fd5112a8b5f9f063710dcc64ea9f62a7950b6 [file] [log] [blame]
// 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.subtract
description: Verify that undefined options are handled correctly.
features: [Temporal]
includes: [temporalHelpers.js]
---*/
const jan31 = new Temporal.PlainDateTime(2020, 1, 31, 15, 0);
TemporalHelpers.assertPlainDateTime(
jan31.subtract({ months: 2 }, {}),
2019, 11, "M11", 30, 15, 0, 0, 0, 0, 0,
"options may be empty object"
);
TemporalHelpers.assertPlainDateTime(
jan31.subtract({ months: 2 }, () => {}),
2019, 11, "M11", 30, 15, 0, 0, 0, 0, 0,
"options may be function object"
);