test262/test/built-ins/Promise/try/ctx-non-ctor.js
2024-05-01 15:27:31 -07:00

13 lines
330 B
JavaScript

// Copyright (C) 2024 Jordan Harband. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Promise.try errors when the receiver is not a constructor
esid: sec-promise.try
features: [promise-try]
---*/
assert.throws(TypeError, function () {
Promise.try.call(eval);
});