tests/auto/qml/ecmascripttests/test262/test/built-ins/Promise/S25.4.3.1_A2.1_T1.js
raw| 1 | // Copyright 2014 Cubane Canada, Inc. All rights reserved. |
| 2 | // See LICENSE for details. |
| 3 | |
| 4 | /*--- |
| 5 | info: | |
| 6 | Promise throws TypeError when 'this' is not Object |
| 7 | es6id: S25.4.3.1_A2.1_T1 |
| 8 | author: Sam Mikes |
| 9 | description: Promise.call("non-object") throws TypeError |
| 10 | ---*/ |
| 11 | |
| 12 | assert.throws(TypeError, function() { |
| 13 | Promise.call("non-object", function() {}); |
| 14 | }); |