summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Temporal/PlainDate/from/argument-string-trailing-junk.js
blob: 8888b509dae1517ad771aa9eb2870f74092438ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// |reftest| skip -- Temporal is not supported
// 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.plaindate.from
description: RangeError thrown if a string with trailing junk is used as a PlainDate
features: [Temporal, arrow-function]
---*/

assert.throws(RangeError, () => Temporal.PlainDate.from("1976-11-18junk"),
  "String with trailing junk should not be valid as a PlainDate");

reportCompare(0, 0);