Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Promise/race/S25.4.4.3_A3.1_T1.js

raw
1 // Copyright 2014 Cubane Canada, Inc. All rights reserved.
2 // See LICENSE for details.
3
4 /*---
5 info: |
6 Promise.race throws on invalid 'this'
7 Note: must have at least one element in array, or else Promise.race
8 never exercises the code that throws
9 es6id: S25.4.4.3_A3.1_T1
10 author: Sam Mikes
11 description: Promise.race throws if 'this' does not conform to Promise constructor
12 ---*/
13
14 function ZeroArgConstructor() {}
15
16 assert.throws(TypeError, function() {
17 Promise.race.call(ZeroArgConstructor, [3]);
18 });