Utap doesn't respect exit code
Hello! When tests fail they must return the 1 exit code. But when piped with utap, exit code is always 0.

I use Node test runner, which returns correct code itself:

Is set -o pipefail what you're looking for?
Don't think so.
When I tried other reporters (like tap-diff and etc.), they return same exit code, which was transfered by pipe.
I apologize, I should have presented my point in a more precise fashion.
It is certainly possible for a TAP formatter to return the same exit code as the test suite itself just because the input can be interpreted as an error when it contains TAP TestPoint starting with not ok.
In my opinion, it's a hack - a leaky abstraction that is against UNIX philosophy.
You would not expect foo | sed s/bar/baz/ to return you anything different from 0 exit code even if foo actually failed because the task of substituting bar to baz in its output in and of itself succeeds pretty well.
In the same sense the task of formatting the not ok TAP output with a nice red cross next to it actually does succeed, semantically speaking...
To summarize, my point is whether or not foo | bar should return foo's exit code or bar's one can only be decided in the context of the script itself in a general semantic case. By default bash takes the exit code of the last command in the pipe, but this can be modified by various means, the easiest of which would be prepending the command with set -o pipefail, e.g.
set -o pipefail
npm test && npm deploy
where you'd have your pipe in the npm test script