Comments (8)
Hmmm not seen it before, can you provide any more info?
from grunt-cucumberjs.
I just tried again on a fresh express-seed app and it works as expected. Looks awesome. Sorry for the bother.
from grunt-cucumberjs.
This error happens if you console.log something in your cucumber step definitions.
I'm wondering if there is a way to tell the difference between report output from cucumberjs & console logging.
If so, we could print out the log in the right spot in the report and not have the test run fail.
from grunt-cucumberjs.
Cool, let me have a look. Will get back to you.
from grunt-cucumberjs.
I know why it's happening, just thinking of a decent solution now.
cucumber.on('close', function (code) {
var stdout = Buffer.concat(_.last(buffer));
if(code != 0) {
grunt.log.error('failed tests, please see the output');
(config.format === 'html') ? publish(JSON.parse(stdout)) : grunt.log.write(stdout);
return done(false);
}
publish(JSON.parse(stdout));
return done();
});
specifically
publish(JSON.parse(stdout));
Problem is that console statements mix with the stdout of cucumber.js JSON output. Not sure what to do yet... any suggestions?
from grunt-cucumberjs.
Stripping out the console statements from the stdout does not appear easy. We do know what the json structure should look like so it may be possible with some crazy string parsing.
I haven't looked much into the cucumberjs source but I wonder if the console statements could be handled separately.
from grunt-cucumberjs.
Turns out it was easy. Cucumberjs outputs the console statements before the json report.
All I had to do was find the point where the cucumber report data starts and split the output.
from grunt-cucumberjs.
@jdewit just published this now as 0.3.0
.
from grunt-cucumberjs.
Related Issues (20)
- Issue downloading latest grunt-cucumberjs version [V1.0.0] HOT 2
- Issues resolved in fork, waiting on response to PR HOT 4
- Cucumber 2 support HOT 1
- Global variables not persisted through cucumberjs task HOT 1
- {prod} --> npm publish HOT 1
- support for node 0.12
- Breasks with cucumber@4 HOT 1
- Command Injection - Vulnerabilities Observed in dependent package
- Npm audit- Vulnerabilities Observed in dependent package
- html report broken HOT 5
- Submit HTML reporting to cucumber-js HOT 2
- formats html+pretty, pretty won't output HOT 3
- 'Output' option not creating folder structure HOT 1
- Parallel option not working with latest version of plugin HOT 5
- Html report wont open some scenario details but opens others HOT 3
- peerDependencies: 0.4.5
- rerun HOT 1
- Report is overwritten when using re-run option HOT 2
- Issue in '--tags' parameter work logic HOT 1
- Cannot run some feature from cli (Ubuntu) HOT 4
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 grunt-cucumberjs.