lorenzofox3 / zora

Lightest, yet Fastest Javascript test runner for nodejs and browsers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inconsistent behaviour of tap reporters

icetbr opened this issue · comments

Hi, would you mind creating a sample tap reporter to show its interaction with zora? I'm having a few issues.

I can't get ANY tap reporter to work with nodemon. Using tap-diff, for instance, on first save it works, on the second, it doesn't.

And my custom reporter only the first save works. Here is a demo project: https://github.com/icetbr/tapReporterExample

first save

npm run testTapDiff

> testTapDiff
> nodemon --quiet test/test.js | tap-diff


  reporter
    ✖  should be equivalent at  file:///home/ddv/dev/projects/tapReporterExample/test/test.js:3:30
        45

  skip  0

seconds save

        TAP version 13

  reporter
        not ok 1 - should be equivalent
          ---
            actual: 4
            expected: 5
            operator: "equal"
            at: " file:///home/ddv/dev/projects/tapReporterExample/test/test.js:3:30"
          ...
        1..1

  skip  0

ok let me check. I am not sure how nodemon pass the stdout stream

I suspect an issue with a (missing) final end of line which confuses the tap parser.

A easy workaround would be to trigger the test as a command:
nodemon --exec "node test/test.js | tap-diff"