summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/intl402/DurationFormat/constructor-options-invalid.js
blob: 26b0c361fa1205f3e124abe026bf4757d2886f9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// |reftest| skip -- Intl.DurationFormat is not supported
// Copyright 2022 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-Intl.DurationFormat
description: Checks handling of a null options argument to the DurationFormat constructor.
info: |
    Intl.DurationFormat ( [ locales [ , options ] ] )
    (...)
    4. Let options be GetOptionsObject(options).
features: [Intl.DurationFormat]
---*/

assert.sameValue(typeof Intl.DurationFormat, "function");

assert.throws(TypeError, function() { new Intl.DurationFormat([], null) })

reportCompare(0, 0);