mirror of https://github.com/tc39/test262.git
Fix executor arguments validation in Promise subclass test
This commit is contained in:
parent
8a4abc2a00
commit
7e94b8b7ac
|
@ -23,12 +23,14 @@ assert.throws(TypeError, function() {
|
|||
});
|
||||
|
||||
var calledExecutor = false;
|
||||
var executorArguments;
|
||||
|
||||
var prom1 = new Prom(function(resolve) {
|
||||
var prom1 = new Prom(function() {
|
||||
calledExecutor = true;
|
||||
assert.sameValue(arguments.length, 2);
|
||||
assert(arguments[0] === Promise.resolve);
|
||||
assert(arguments[1] === Promise.reject);
|
||||
executorArguments = arguments;
|
||||
});
|
||||
|
||||
assert(calledExecutor);
|
||||
assert.sameValue(executorArguments.length, 2);
|
||||
assert.sameValue(typeof executorArguments[0], "function");
|
||||
assert.sameValue(typeof executorArguments[1], "function");
|
||||
|
|
Loading…
Reference in New Issue