Comments (10)
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.
These streams should be consumed by stream-consume
in orchestrator. Sounds like you need to update.
from gulp-mocha.
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.
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.
@pschuegr This is fixed in 1.1.0
.
from gulp-mocha.
Perfect! thanks a bunch!
from gulp-mocha.
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.
@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.
I looked into this further. What's the reason for this.queue(file)
? I removed it completely and all tests ran.
from gulp-mocha.
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)
- Cannot require multiple files HOT 1
- Provide a way to specify --async-only to Mocha HOT 2
- Module-alias broken in 4.3.1 HOT 1
- Support the --slow flag HOT 2
- Security Issue: [email protected] › [email protected] allows arbitrary code injection HOT 1
- Move mocha to peer dependency HOT 2
- Specifying a custom path for "opts" option does not work
- How to provide the forbid-only flag? HOT 1
- Drop dependency on deprecated `gulp-util`
- e
- DeprecationWarning: “--compilers” will be removed in a future version of Mocha HOT 2
- Migrating to Gulp 4: Running into Issues with gulp-mocha tests
- end event not being triggered after version 3.0.1 HOT 2
- After migration to version 6.0.0 error handling is not working as expected
- Version 7.0.0 fails for basic tests HOT 3
- TypeScript support
- finish event called before error event
- BigInt support (mocha v8.3+)
- Node version support
- Problems with 10 version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-mocha.