mirror of https://github.com/tc39/test262.git
25 lines
636 B
JavaScript
25 lines
636 B
JavaScript
// Reviewed
|
|
/***
|
|
- jsc
|
|
- ch
|
|
- d8: Error: bad value: ["length","name"]
|
|
- jsshell: Error: bad value: ["length","name"]
|
|
*/
|
|
function shouldBe(actual, expected)
|
|
{
|
|
if (actual !== expected)
|
|
throw new Error('bad value: ' + actual);
|
|
}
|
|
|
|
var executorFunction;
|
|
function NotPromise(executor) {
|
|
executorFunction = executor;
|
|
executor(function(){}, function(){});
|
|
}
|
|
Promise.resolve.call(NotPromise);
|
|
|
|
shouldBe(JSON.stringify(Object.getOwnPropertyNames(executorFunction).sort()), `["length"]`);
|
|
shouldBe(executorFunction.hasOwnProperty('name'), false);
|
|
shouldBe(executorFunction.name, ``);
|
|
shouldBe(delete executorFunction.name, true);
|