Skip to content

Tap reporter outputs internal stack traces #3326

Open
@Inomares

Description

@Inomares
  • What you're trying to do: See stack trace of failing tests while using the --tap parameter.
  • What happened: Stack traces point to ava internals:
TAP version 13
not ok 1 - failing ava test
  ---
    name: AssertionError
    assertion: t.is()
    details:
      'Difference (- actual, + expected):': |-
        - true
        + false
    message: ''
    at: >-
      ExecutionContext.is
      (file:///workspaces/codespaces-blank/node_modules/ava/lib/assert.js:309:16)
  ...

1..1
# tests 1
# pass 0
# fail 1
  • What you expected to happen: Stack traces point to the failing test (such as at: 'file://test.js:4:7')

Minimal reproducible example:
https://github.com/Inomares/ava-tap-min-repro/tree/main (Tested in Node 18.20.1 and 20.12.1)

Affects AVA version 6.0.0 and above. Versions prior to 6.0.0 display the correct stack trace.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions