constructor-options-throwing-getters-trailing-zero-display.js (533B)
1 // Copyright 2021 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 esid: sec-initializenumberformat 5 description: > 6 Exception from accessing the "trailingZeroDisplay" option for the 7 NumberFormat constructor should be propagated to the caller 8 features: [Intl.NumberFormat-v3] 9 ---*/ 10 11 assert.throws(Test262Error, function() { 12 new Intl.NumberFormat('en', { 13 get trailingZeroDisplay() { 14 throw new Test262Error(); 15 } 16 }); 17 }); 18 19 reportCompare(0, 0);