mirror of
https://github.com/tc39/test262.git
synced 2025-07-22 13:34:38 +02:00
Add an example of using assert.throws
This commit is contained in:
parent
fa4c337570
commit
66a39c0423
@ -6,9 +6,10 @@ info: >
|
|||||||
Promise throws TypeError when 'this' is constructed but unsettled promise
|
Promise throws TypeError when 'this' is constructed but unsettled promise
|
||||||
author: Sam Mikes
|
author: Sam Mikes
|
||||||
description: Promise.call(new Promise()) throws TypeError
|
description: Promise.call(new Promise()) throws TypeError
|
||||||
negative: TypeError
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
var p = new Promise(function() {});
|
var p = new Promise(function() {});
|
||||||
|
|
||||||
Promise.call(p, function () {});
|
assert.throws(TypeError, function () {
|
||||||
|
Promise.call(p, function () {});
|
||||||
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user