Comments (4)
Does this work on Windows?
"test:cov": "babel-node ./node_modules/.bin/isparta cover _mocha -- --recursive --require test/setup.js"
I didn't update any versions or anything, so you might want to rm -rf node_modules && npm install
before trying. I don't have a windows machine to test on so if this works for you I'll merge it in. My result was
Redux Bug Reporter component tests
Server side render tests
✓ Server side render
Client side render tests
✓ Happy path (266ms)
✓ customEncode and customDecode properties (232ms)
✓ Custom submit function (215ms)
✓ Error listeners
✓ window.onerror listeners when window.onerror already exists
Store Enhancer tests
Overriding the store. You should only be doing this if you are using the bug reporter
✓ bug playback functionality
✓ middleware functionality
8 passing (2s)
================================================================================
Writing coverage object [/Users/drew/wrk/redux-bug-reporter/coverage/coverage.json]
Writing coverage reports at [/Users/drew/wrk/redux-bug-reporter/coverage]
================================================================================
=============================== Coverage summary ===============================
Statements : 85.5% ( 230/269 ), 13 ignored
Branches : 80.6% ( 108/134 ), 9 ignored
Functions : 87.5% ( 42/48 ), 2 ignored
Lines : 82.54% ( 156/189 )
================================================================================
Thanks!
from redux-bug-reporter.
I'm going to merge in my change assuming it solves your issue, if you're still having problems please feel free to reopen this issue. Thanks!
from redux-bug-reporter.
Tried again;
> npm run test:cov
> [email protected] test:cov C:\code\redux-bug-reporter
> babel-node ./node_modules/.bin/isparta cover _mocha -- --recursive --require test/setup.js
C:\code\redux-bug-reporter\node_modules\.bin\isparta:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
^^^^^^^
SyntaxError: missing ) after argument list
at Object.exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:513:28)
at Module._extensions..js (module.js:550:10)
at Object.require.extensions.(anonymous function) [as .js] (C:\code\redux-bug-reporter\node_modules\babel-register\lib\node.js:154:7)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Function.Module.runMain (module.js:575:10)
at C:\code\redux-bug-reporter\node_modules\babel-cli\lib\_babel-node.js:151:24
at Object.<anonymous> (C:\code\redux-bug-reporter\node_modules\babel-cli\lib\_babel-node.js:152:7)
Seems that it picks up the sh script and not the .cmd version of isparta.
After some research, it seems that isparta isn't very Windows friendly, and that the maintainers have left it to rot. Can I recommend that you switch to nyc (an alternative istanbul frontend) instead? It works great on both Windows and unix/linux systems, ex.
nyc --reporter=text npm test
I can create an PR if you'd like.
from redux-bug-reporter.
@larsw That'd be great if you want to make a PR. Getting code coverage working originally was pretty hairy for me and refactoring it isn't a top priority, since it's not crucial for the developer to have it work. But if you can get it working with nyc
and verify it in windows I'd love to see it!
from redux-bug-reporter.
Related Issues (14)
- Would this work with Immutable state aswel?
- Consider switching from ghooks to husky HOT 3
- Explore in-line styles with custom style override props
- idea: investigate if it's possible to incorporate html2canvas HOT 1
- Update standard, perhaps remove babel-eslint dependency
- Evaluate migrating to Jest
- Please provide api to send Authorization headers while sending POSTs to server. HOT 4
- maxHistoryToRetain configuration option
- React 16 support HOT 7
- When using a personal access token with github, receive 422 error HOT 4
- Add Chat HOT 1
- The bug container is bigger than it should be and it blocks clicks outside of it's visible area. HOT 4
- Update to standard 8.0.0 HOT 10
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 redux-bug-reporter.