Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
let date = new Date(Date.now()); new date.getYear();
}, '`let date = new Date(Date.now()); new date.getYear()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
let date = new Date(Date.now()); new date.setYear();
}, '`let date = new Date(Date.now()); new date.setYear()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
let date = new Date(Date.now()); new date.toGMTString();
}, '`let date = new Date(Date.now()); new date.toGMTString()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ assert.throws(
TypeError,
function () {
RegExp.prototype.compile.call(otherRealm_regexp);
},
"`RegExp.prototype.compile.call(otherRealm_regexp)` throws TypeError"
);
});

assert.throws(
other.TypeError,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,10 @@ assert.throws(
TypeError,
function () {
subclass_regexp.compile();
},
"`subclass_regexp.compile()` throws TypeError"
);
});

assert.throws(
TypeError,
function () {
RegExp.prototype.compile.call(subclass_regexp);
},
"`RegExp.prototype.compile.call(subclass_regexp)` throws TypeError"
);
});
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new String.prototype.anchor();
}, '`new String.prototype.anchor()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ assert.sameValue(isConstructor(String.prototype.big), false, 'isConstructor(Stri

assert.throws(TypeError, () => {
new String.prototype.big();
}, '`new String.prototype.big()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new String.prototype.blink();
}, '`new String.prototype.blink()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new String.prototype.bold();
}, '`new String.prototype.bold()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new String.prototype.fixed();
}, '`new String.prototype.fixed()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new String.prototype.fontcolor();
}, '`new String.prototype.fontcolor()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new String.prototype.fontsize();
}, '`new String.prototype.fontsize()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new String.prototype.italics();
}, '`new String.prototype.italics()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new String.prototype.link();
}, '`new String.prototype.link()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new String.prototype.small();
}, '`new String.prototype.small()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new String.prototype.strike();
}, '`new String.prototype.strike()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ assert.sameValue(isConstructor(String.prototype.sub), false, 'isConstructor(Stri

assert.throws(TypeError, () => {
new String.prototype.sub();
}, '`new String.prototype.sub()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new String.prototype.substr();
}, '`new String.prototype.substr()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ assert.sameValue(isConstructor(String.prototype.sup), false, 'isConstructor(Stri

assert.throws(TypeError, () => {
new String.prototype.sup();
}, '`new String.prototype.sup()` throws TypeError');
});

2 changes: 1 addition & 1 deletion test/annexB/built-ins/escape/not-a-constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ assert.sameValue(isConstructor(escape), false, 'isConstructor(escape) must retur

assert.throws(TypeError, () => {
new escape('');
}, '`new escape(\'\')` throws TypeError');
});

2 changes: 1 addition & 1 deletion test/annexB/built-ins/unescape/not-a-constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ assert.sameValue(isConstructor(unescape), false, 'isConstructor(unescape) must r

assert.throws(TypeError, () => {
new unescape('');
}, '`new unescape(\'\')` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new Array.prototype[Symbol.iterator]();
}, '`new Array.prototype[Symbol.iterator]()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new Array.prototype.copyWithin();
}, '`new Array.prototype.copyWithin()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new Array.prototype.entries();
}, '`new Array.prototype.entries()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new Array.prototype.every(() => {});
}, '`new Array.prototype.every(() => {})` throws TypeError');
});

2 changes: 1 addition & 1 deletion test/built-ins/Array/prototype/fill/not-a-constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Array.prototype.fill), false, 'isConstructor(Arra

assert.throws(TypeError, () => {
new Array.prototype.fill();
}, '`new Array.prototype.fill()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new Array.prototype.filter(() => {});
}, '`new Array.prototype.filter(() => {})` throws TypeError');
});

2 changes: 1 addition & 1 deletion test/built-ins/Array/prototype/find/not-a-constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Array.prototype.find), false, 'isConstructor(Arra

assert.throws(TypeError, () => {
new Array.prototype.find(() => {});
}, '`new Array.prototype.find(() => {})` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new Array.prototype.findIndex(() => {});
}, '`new Array.prototype.findIndex(() => {})` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Array.prototype.findLast), false, 'isConstructor(

assert.throws(TypeError, () => {
new Array.prototype.findLast(() => {});
}, '`new Array.prototype.findLast(() => {})` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new Array.prototype.findLastIndex(() => {});
}, '`new Array.prototype.findLastIndex(() => {})` throws TypeError');
});

2 changes: 1 addition & 1 deletion test/built-ins/Array/prototype/flat/not-a-constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Array.prototype.flat), false, 'isConstructor(Arra

assert.throws(TypeError, () => {
new Array.prototype.flat();
}, '`new Array.prototype.flat()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new Array.prototype.flatMap(() => {});
}, '`new Array.prototype.flatMap(() => {})` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new Array.prototype.forEach(() => {});
}, '`new Array.prototype.forEach(() => {})` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new Array.prototype.includes(1);
}, '`new Array.prototype.includes(1)` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new Array.prototype.indexOf();
}, '`new Array.prototype.indexOf()` throws TypeError');
});

2 changes: 1 addition & 1 deletion test/built-ins/Array/prototype/join/not-a-constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Array.prototype.join), false, 'isConstructor(Arra

assert.throws(TypeError, () => {
new Array.prototype.join();
}, '`new Array.prototype.join()` throws TypeError');
});

2 changes: 1 addition & 1 deletion test/built-ins/Array/prototype/keys/not-a-constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Array.prototype.keys), false, 'isConstructor(Arra

assert.throws(TypeError, () => {
new Array.prototype.keys();
}, '`new Array.prototype.keys()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new Array.prototype.lastIndexOf();
}, '`new Array.prototype.lastIndexOf()` throws TypeError');
});

2 changes: 1 addition & 1 deletion test/built-ins/Array/prototype/map/not-a-constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Array.prototype.map), false, 'isConstructor(Array

assert.throws(TypeError, () => {
new Array.prototype.map(() => {});
}, '`new Array.prototype.map(() => {})` throws TypeError');
});

2 changes: 1 addition & 1 deletion test/built-ins/Array/prototype/pop/not-a-constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Array.prototype.pop), false, 'isConstructor(Array

assert.throws(TypeError, () => {
new Array.prototype.pop();
}, '`new Array.prototype.pop()` throws TypeError');
});

2 changes: 1 addition & 1 deletion test/built-ins/Array/prototype/push/not-a-constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Array.prototype.push), false, 'isConstructor(Arra

assert.throws(TypeError, () => {
new Array.prototype.push();
}, '`new Array.prototype.push()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new Array.prototype.reduce(() => {}, []);
}, '`new Array.prototype.reduce(() => {}, [])` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new Array.prototype.reduceRight(() => {}, []);
}, '`new Array.prototype.reduceRight(() => {}, [])` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new Array.prototype.reverse();
}, '`new Array.prototype.reverse()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new Array.prototype.shift();
}, '`new Array.prototype.shift()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new Array.prototype.slice();
}, '`new Array.prototype.slice()` throws TypeError');
});

2 changes: 1 addition & 1 deletion test/built-ins/Array/prototype/some/not-a-constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Array.prototype.some), false, 'isConstructor(Arra

assert.throws(TypeError, () => {
new Array.prototype.some(() => {});
}, '`new Array.prototype.some(() => {})` throws TypeError');
});

2 changes: 1 addition & 1 deletion test/built-ins/Array/prototype/sort/not-a-constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ assert.sameValue(isConstructor(Array.prototype.sort), false, 'isConstructor(Arra

assert.throws(TypeError, () => {
new Array.prototype.sort();
}, '`new Array.prototype.sort()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new Array.prototype.splice();
}, '`new Array.prototype.splice()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new Array.prototype.toLocaleString();
}, '`new Array.prototype.toLocaleString()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new Array.prototype.toReversed();
}, '`new Array.prototype.toReversed()` throws TypeError');
});

Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ features: [change-array-by-copy]

assert.throws(TypeError, () => {
Array.prototype.toReversed.call(null);
}, '`Array.prototype.toReversed.call(null)` throws TypeError');
});

assert.throws(TypeError, () => {
Array.prototype.toReversed.call(undefined);
}, '`Array.prototype.toReversed.call(undefined)` throws TypeError');
});
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ assert.sameValue(

assert.throws(TypeError, () => {
new Array.prototype.toSorted();
}, '`new Array.prototype.toSorted()` throws TypeError');
});

Loading