Debian Codegraph @

js/src/tests/test262/built-ins/Temporal/PlainMonthDay/from/argument-string-unknown-annotation.js

raw
1 // |reftest| shell-option(--enable-temporal) skip-if(!this.hasOwnProperty('Temporal')||!xulRuntime.shell) -- Temporal is not enabled unconditionally, requires shell-options
2 // Copyright (C) 2022 Igalia, S.L. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 esid: sec-temporal.plainmonthday.from
7 description: Various forms of unknown annotation
8 features: [Temporal]
9 includes: [temporalHelpers.js]
10 ---*/
11
12 const tests = [
13 ["1976-05-02T15:23[foo=bar]", "alone"],
14 ["1976-05-02T15:23[UTC][foo=bar]", "with time zone"],
15 ["1976-05-02T15:23[u-ca=iso8601][foo=bar]", "with calendar"],
16 ["1976-05-02T15:23[UTC][foo=bar][u-ca=iso8601]", "with time zone and calendar"],
17 ["1976-05-02T15:23[foo=bar][_foo-bar0=Ignore-This-999999999999]", "with another unknown annotation"],
18 ];
19
20 tests.forEach(([arg, description]) => {
21 const result = Temporal.PlainMonthDay.from(arg);
22
23 TemporalHelpers.assertPlainMonthDay(
24 result,
25 "M05", 2,
26 `unknown annotation (${description})`
27 );
28 });
29
30 reportCompare(0, 0);