Skip to content

Mocha exits with 0 exit code with failing tests #2713

@chris-codaio

Description

@chris-codaio

Node: 7.2.1
Mocha: 3.2.0
MacOSX: Sierra (10.12.3)
Cmdline: mocha my_test.js

Seeing mocha exit with a 0 exit code after failing a test in an after each hook. I traced it down to this code:

stream.write('', done);

The function is called with the correct exit code, but then stream.write('', done); doesn't call the callback before the process terminates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: buga defect, confirmed by a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions