constructor-options-invalid.js (567B)
1 // Copyright 2022 Igalia, S.L. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 esid: sec-Intl.DurationFormat 6 description: Checks handling of a null options argument to the DurationFormat constructor. 7 info: | 8 Intl.DurationFormat ( [ locales [ , options ] ] ) 9 (...) 10 4. Let options be GetOptionsObject(options). 11 features: [Intl.DurationFormat] 12 ---*/ 13 14 assert.sameValue(typeof Intl.DurationFormat, "function"); 15 16 assert.throws(TypeError, function() { new Intl.DurationFormat([], null) }) 17 18 reportCompare(0, 0);