Skip to content

end() does not actually end the promise #16

@nicks

Description

@nicks

var q = require('kew')
q.resolve(true).end().then(function (x) { console.log("I'm still here") })

Logs "I'm still here"

Notice that end() does end all exceptions
q.reject(new Error()).end().then(function () {
console.log('never logged')
}).fail(function () {
console.log('never logged')
})

In contrast, Q's done() method returns nothing, so that the promise can't be chained at all. (And I think that's the right API)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions