From 66a39c0423e388a94ca37c85c91bcf182cf3e0dc Mon Sep 17 00:00:00 2001 From: Domenic Denicola <d@domenic.me> Date: Wed, 3 Dec 2014 18:31:38 -0500 Subject: [PATCH] Add an example of using assert.throws --- .../suite/es6/ch25/25.4/25.4.3/25.4.3.1/S25.4.3.1_A2.2_T1.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/suite/es6/ch25/25.4/25.4.3/25.4.3.1/S25.4.3.1_A2.2_T1.js b/test/suite/es6/ch25/25.4/25.4.3/25.4.3.1/S25.4.3.1_A2.2_T1.js index 93e69c395d..1f163f0fa8 100644 --- a/test/suite/es6/ch25/25.4/25.4.3/25.4.3.1/S25.4.3.1_A2.2_T1.js +++ b/test/suite/es6/ch25/25.4/25.4.3/25.4.3.1/S25.4.3.1_A2.2_T1.js @@ -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 () {}); +}); -- GitLab