summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Promise/withResolvers/ctx-non-ctor.js
blob: b5364593b80ff7dc52a3316b6a03d37a0b80d131 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Copyright (C) 2023 Peter Klecha. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
description: Promise.withResolvers errors when the receiver is not a constructor
esid: sec-promise.withresolvers
features: [promise-with-resolvers]
---*/

assert.throws(TypeError, function() {
  Promise.withResolvers.call(eval);
});

reportCompare(0, 0);