Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve then reject miss test case #87

Open
yanhaijing opened this issue May 30, 2018 · 0 comments
Open

resolve then reject miss test case #87

yanhaijing opened this issue May 30, 2018 · 0 comments

Comments

@yanhaijing
Copy link

yanhaijing commented May 30, 2018

var p = new Promise(function (resolve, reject) {
    resolve(new Promise(function(resolve2, reject2) {
        setTimeout(resolve2, 1000)
    }))
    reject();
});

p.then(function () {
    console.log(1) // correct
}, function () {
    console.log(2)
})

console.log(1) is right behavior, console.log(2) is error behavior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant