Giter VIP home page Giter VIP logo

Comments (10)

sindresorhus avatar sindresorhus commented on September 3, 2024

I've seen this problem on multiple gulp plugins. I'm not interested in adding an option as it should rather be fixed. Can you open a ticket on gulp?

from gulp-mocha.

phated avatar phated commented on September 3, 2024

These streams should be consumed by stream-consume in orchestrator. Sounds like you need to update.

from gulp-mocha.

pschuegr avatar pschuegr commented on September 3, 2024

Can anybody recommend a workaround? Otherwise I'm going to have to revert to an older version - don't have time to help fix this atm.

from gulp-mocha.

floatdrop avatar floatdrop commented on September 3, 2024

This is caused by this line - https://github.com/sindresorhus/gulp-mocha/blob/master/index.js#L25

@pschuegr you can attach .on('data', function () {}) after .pipe(mocha()) - it will force stream to switch in stream1 mode - which will flush buffers and highWaterMark will be not a problem.

from gulp-mocha.

floatdrop avatar floatdrop commented on September 3, 2024

@pschuegr This is fixed in 1.1.0.

from gulp-mocha.

pschuegr avatar pschuegr commented on September 3, 2024

Perfect! thanks a bunch!

from gulp-mocha.

hershmire avatar hershmire commented on September 3, 2024

I'm seeing this issue with the latest [email protected]. However, it silently fails (never runs any of the tests and just completes) when there are 80 or more test files it's trying to deal with. It has something to do with through and adding the files to the queue – this.queue(file). I've added a counter in gulp-mocha/index.js to see if I can get tests to run by limiting the amount of test files to add. See below:

This will pass because I limit it to 79 total tests:

var counter = 0;
return through(function(file) {
	mocha.addFile(file.path);
	// this.queue(file);
	counter++;
	if (counter < 80) {
		console.log('File:', counter, file.path);
		this.queue(file);
	}
}, function() {
	var self = this;
	var d = domain.create();
	var runner;
...

This will silently fail because it uses 80 tests:

var counter = 0;
return through(function(file) {
	mocha.addFile(file.path);
	// this.queue(file);
	counter++;
	if (counter <= 80) {
		console.log('File:', counter, file.path);
		this.queue(file);
	}
}, function() {
	var self = this;
	var d = domain.create();
	var runner;
...

from gulp-mocha.

shellscape avatar shellscape commented on September 3, 2024

@hershmire I'd encourage you to mention that issue with the through project if that's truly the culprit (or to triage whether it is).

from gulp-mocha.

hershmire avatar hershmire commented on September 3, 2024

I looked into this further. What's the reason for this.queue(file)? I removed it completely and all tests ran.

from gulp-mocha.

shellscape avatar shellscape commented on September 3, 2024

https://github.com/dominictarr/through/blob/master/index.js#L40 is the source for that method. I'm not familiar with the through module, though. this will be moot as #151 uses through2

from gulp-mocha.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.