Skip to content

idea: extra param for more details #58

@Offirmo

Description

@Offirmo

In dev mode, just an error can be a bit terse. I then have to find the failing assertion and add a bunch of console.log about the current state.

I could include the data in the error message, but:

  • it's not good for privacy
  • it's not good for matching the error in logs

How about an extended API assert(digits.startsWith(ref_digits), 'xxx() ref_digits must match', () => console.error({digits, ref_digits}))

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions