test262/test/built-ins/isFinite/S15.1.2.5_A2.7.js
Rick Waldron 6230065d07
chore: migrate $ERROR -> throw new Test262Error in test/built-ins/isFinite,isNaN (#3086)
* chore: migrate $ERROR -> throw new Test262Error in test/built-ins/isFinite,isNaN

* Update test/built-ins/isFinite/S15.1.2.5_A2.7.js

Co-authored-by: Leo Balter <leonardo.balter@gmail.com>

* Update test/built-ins/isNaN/S15.1.2.4_A2.7.js

Co-authored-by: Leo Balter <leonardo.balter@gmail.com>

Co-authored-by: Leo Balter <leonardo.balter@gmail.com>
2021-07-21 12:41:06 -07:00

21 lines
528 B
JavaScript

// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: The isFinite property can't be used as constructor
esid: sec-isfinite-number
description: >
If property does not implement the internal [[Construct]] method,
throw a TypeError exception
---*/
//CHECK#1
try {
new isFinite();
} catch (e) {
if ((e instanceof TypeError) !== true) {
throw new Test262Error('#1.2: new isFinite() throw TypeError. Actual: ' + (e));
}
}