Skip to content

Officially expose assertion error properties on t.try() results #2248

Open
@novemberborn

Description

@novemberborn

#1947 landed a new t.try() assertion. We haven't yet figured out what assertion error details we want to expose.

For reference:

const attempt = await t.try(tt => {
  tt.is(true, false)
})

const [error] = attempt.errors
// What should we define on this `error` object?

See:

class AssertionError extends Error {

Some of these properties are internal, others are outdated. So let's hash out which ones we're comfortable exposing and supporting.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @novemberborn

        Issue actions

          Officially expose assertion error properties on `t.try()` results · Issue #2248 · avajs/ava