mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 15:17:29 +09:00
Tests
This commit is contained in:
parent
38fabf8122
commit
74e5882176
3 changed files with 35 additions and 0 deletions
17
js/src/tests/ecma_6/Error/constructor-proto.js
Normal file
17
js/src/tests/ecma_6/Error/constructor-proto.js
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
const nativeErrors = [
|
||||
InternalError,
|
||||
EvalError,
|
||||
RangeError,
|
||||
ReferenceError,
|
||||
SyntaxError,
|
||||
TypeError,
|
||||
URIError
|
||||
];
|
||||
|
||||
assertEq(Reflect.getPrototypeOf(Error), Function.prototype)
|
||||
|
||||
for (const error of nativeErrors)
|
||||
assertEq(Reflect.getPrototypeOf(error), Error);
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(0, 0);
|
||||
18
js/src/tests/ecma_6/Error/prototype.js
vendored
Normal file
18
js/src/tests/ecma_6/Error/prototype.js
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
const nativeErrors = [
|
||||
InternalError,
|
||||
EvalError,
|
||||
RangeError,
|
||||
ReferenceError,
|
||||
SyntaxError,
|
||||
TypeError,
|
||||
URIError
|
||||
];
|
||||
|
||||
assertEq(Reflect.getPrototypeOf(Error.prototype), Object.prototype)
|
||||
|
||||
for (const error of nativeErrors) {
|
||||
assertEq(Reflect.getPrototypeOf(error.prototype), Error.prototype);
|
||||
}
|
||||
|
||||
if (typeof reportCompare === "function")
|
||||
reportCompare(0, 0);
|
||||
0
js/src/tests/ecma_6/Error/shell.js
Normal file
0
js/src/tests/ecma_6/Error/shell.js
Normal file
Loading…
Add table
Add a link
Reference in a new issue