summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Temporal/PlainTime/from/argument-string-no-implicit-midnight.js
blob: 7269411e5a16a332f6025102a74c4d94cbab6867 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// |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.plaintime.from
description: RangeError thrown if a date-only string is passed in a PlainTime context
features: [Temporal, arrow-function]
---*/

const arg = "2019-10-01";
assert.throws(
  RangeError,
  () => Temporal.PlainTime.from(arg),
  "Date-only string throws, does not implicitly convert to midnight"
);

reportCompare(0, 0);