Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

finish event called before error event #200

Open
ingemarson opened this issue Aug 18, 2020 · 0 comments
Open

finish event called before error event #200

ingemarson opened this issue Aug 18, 2020 · 0 comments

Comments

@ingemarson
Copy link

ingemarson commented Aug 18, 2020

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant