Skip to content
This repository was archived by the owner on Oct 25, 2025. It is now read-only.
This repository was archived by the owner on Oct 25, 2025. It is now read-only.

Show tracebacks from tape-catch #16

Description

@Wilfred

Given the following JS:

import test from 'tape-catch';

test('No such variable', t => {
  foo
});

The package tape-catch uses the following tap structure:

TAP version 13
# No such variable
not ok 1 ReferenceError: foo is not defined
  ---
    operator: error
    expected: |-
      undefined
    actual: |-
      [ReferenceError: foo is not defined]
    at: Test.exports.Test.run (/users/is/whughes/workspace/grail/node_modules/tape-catch/index.js:29:10)
    stack: |-
      ReferenceError: foo is not defined
          at Test.<anonymous> (/users/is/whughes/workspace/grail/static/__tests__/foo-test.js:4:3)
          at Test.bound [as _cb] (/users/is/whughes/workspace/grail/node_modules/tape/lib/test.js:65:32)
          at Test.exports.Test.run (/users/is/whughes/workspace/grail/node_modules/tape-catch/index.js:26:10)
          at Test.bound [as run] (/users/is/whughes/workspace/grail/node_modules/tape/lib/test.js:65:32)
          at Immediate.next (/users/is/whughes/workspace/grail/node_modules/tape/lib/results.js:71:15)
          at runCallback (timers.js:574:20)
          at tryOnImmediate (timers.js:554:5)
          at processImmediate [as _immediateCallback] (timers.js:533:5)
  ...

1..1
# tests 1
# pass  0
# fail  1

Currently tap-diff is suppressing this traceback.

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

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions