Skip to content
Snippets Groups Projects
Commit 66a39c04 authored by Domenic Denicola's avatar Domenic Denicola
Browse files

Add an example of using assert.throws

parent fa4c3375
No related branches found
No related tags found
No related merge requests found
......@@ -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 () {});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment