mirror of
https://github.com/tc39/test262.git
synced 2025-04-08 19:35:28 +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
|
||||
author: Sam Mikes
|
||||
description: Promise.call(new Promise()) throws TypeError
|
||||
negative: TypeError
|
||||
---*/
|
||||
|
||||
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