Backed out changeset 8c746156d7c5 (bug 1908317) as requested by developer CLOSED...
[gecko.git] / js / src / tests / test262 / built-ins / Temporal / PlainMonthDay / prototype / toPlainDate / argument-not-object.js
blobae2550dfecdc98755139b3d06a49fc17132d87e6
1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
2 // Copyright (C) 2021 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.plainmonthday.prototype.toplaindate
7 description: Throws a TypeError if the argument is not an Object
8 features: [BigInt, Symbol, Temporal]
9 ---*/
11 [null, undefined, true, 3.1416, "a string", Symbol("symbol"), 7n].forEach((primitive) => {
12   const plainMonthDay = new Temporal.PlainMonthDay(5, 2);
13   assert.throws(TypeError, () => plainMonthDay.toPlainDate(primitive));
14 });
16 reportCompare(0, 0);