Skip to content

TAP report prints test titles above not ok message #679

@will-weiss

Description

@will-weiss

Description

The TAP report prints the failing assertion rather than the title of the test after the not ok message. If I have a test file test.js that reads:

import { test } from 'ava';

test('one should equal two', t => {
  t.is(1, 2);
});

and I run ava --tap, the resulting TAP report looks like this:

TAP version 13
# one should equal two
not ok 1 - 1 === 2
  ---
    operator: ===
    expected: 2
    actual: 1
    at: _callee$ (test.js:4:4)
  ...

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

This is an issue because I am using a Jenkins TAP Plugin that reports the titles of the tests incorrectly, as it interprets 1 - 1 === 2 as the name of the test. I would expect the TAP report to look like this:

TAP version 13
# one should equal two
not ok 1 - one should equal two
  ---
    operator: ===
    expected: 2
    actual: 1
    at: _callee$ (test.js:4:4)
  ...

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

If this is an issue with a dependency of ava and not with ava itself, please direct me to that project instead and I'll be happy to file an issue there.

Thanks in advance!

Environment

Node.js v5.9.0
darwin 14.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcurrent functionality does not work as desiredhelp wanted

    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