summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/harness/asyncHelpers-asyncTest-rejects-non-callable.js
blob: 6737199524d8806ceae0aa2e6e0ccee2d8abdb9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright (C) 2022 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: |
    The 'asyncTest' helper rejects non-callable test functions.
includes: [asyncHelpers.js, compareArray.js]
---*/

const doneValues = [];
function $DONE(error) {
  doneValues.push(error instanceof Test262Error);
}
asyncTest(null);
asyncTest({});
asyncTest("string");
asyncTest(42);
asyncTest(undefined);
asyncTest();
assert.compareArray(doneValues, [true, true, true, true, true, true]);

reportCompare(0, 0);