blob: a8af3e66289bd37f36b5d7231be943a0f3479642 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
// 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.calendar.prototype.yearmonthfromfields
description: Throw a TypeError if the fields is not an object
features: [Symbol, Temporal]
---*/
const tests = [undefined, null, true, false, "string", Symbol("sym"), Math.PI, Infinity, NaN, 42n];
const iso = Temporal.Calendar.from("iso8601");
for (const fields of tests) {
assert.throws(TypeError, () => iso.yearMonthFromFields(fields, {}));
}
reportCompare(0, 0);
|