Skip to content

finish event called before error event #200

@ingemarson

Description

@ingemarson

Hi,

I went through the issues but couldn't find any solution.
The problem I have is that the finish event gets called before the error event =>

const runUnitTests = (cb) => {
  gulp
    .src(["test/**/*.js"])
    .pipe(mocha())
    .on("error", (err) => {
      cb(err);
    })
    .on("finish", () => {
      cb();
    })
    .on("end", () => {
      cb();
    });
};

and this is the sample unit test I'm using =>

describe('mocha setup test', () => {
	describe('sample tests ', () => {
		it('sample unit test', () => {
			const stupidObject = true;
			stupidObject.should.be.false;
		});
	});
});

And the end event gets never called ... but it is part of the sample in the how-to.

Thanks for your help!

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