blob: 58d22815ab23fd7a783a28d11fd84a8cb53e20e5 [file] [log] [blame]
// Copyright (C) 2021 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.plaindate.prototype.since
description: TypeError thrown when a primitive is passed as the options argument
features: [Temporal]
---*/
const feb20 = Temporal.PlainDate.from("2020-02-01");
const feb21 = Temporal.PlainDate.from("2021-02-01");
const values = [null, true, "hello", Symbol("foo"), 1, 1n];
for (const badOptions of values) {
assert.throws(TypeError, () => feb21.since(feb20, badOptions));
}