Debian Codegraph @

js/src/tests/test262/harness/asyncHelpers-asyncTest-rejects-non-callable.js

raw
1 // Copyright (C) 2022 Igalia, S.L. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 description: |
5 The 'asyncTest' helper rejects non-callable test functions.
6 includes: [asyncHelpers.js, compareArray.js]
7 ---*/
8
9 const doneValues = [];
10 function $DONE(error) {
11 doneValues.push(error instanceof Test262Error);
12 }
13 asyncTest(null);
14 asyncTest({});
15 asyncTest("string");
16 asyncTest(42);
17 asyncTest(undefined);
18 asyncTest();
19 assert.compareArray(doneValues, [true, true, true, true, true, true]);
20
21 reportCompare(0, 0);