Comments (6)
I am currently reviewing testing and should hopefully have some optimisations soon...
from generator-react-webpack.
karma-webpack and karma itself are pretty slow and you can't do anything with that.
For my private project, I've replaced karma-webpack and karma with mocha and hacked jsdom into tests - thankfully, React works nice inside of jsdom environment. Tests became pretty fast now!
But, this setup is hacky. I don't found a way to inject jsdom inside of mocha test via --require
mocha's flag, so ..., every test has header like require('inject-jsdom.js')
from generator-react-webpack.
I also think that it would be a good idea to make the unit test framework a bit more "pluggable", maybe configurable when setting up new projects?
from generator-react-webpack.
+1
from generator-react-webpack.
With the current react release, it is possible to run tests faster by using shallow rendering (@see http://simonsmith.io/unit-testing-react-components-without-a-dom/). This goes without using jsdom.
I will try to find out if this is a suitable change for the generator and provide a feature branch for it soon.
Would be nice if we could have fast tests :).
from generator-react-webpack.
Hey guys,
Using this settings for karma make the tests pretty fast:
https://github.com/webpack/karma-webpack#alternative-usage
Thanks!
from generator-react-webpack.
Related Issues (20)
- Running the generator throws error on expected promise object at the beginning of execution
- NPM Run Dist won't copy over all image assets
- SyntaxError: Unexpected token: name (path) [./cfg/base.js:2,0] when running dist
- Optionally use HtmlWebpackPlugin
- Static files
- how to add postCss plugin,please tell me details of it
- Redux link in README.md seems incorrect
- Hot reloader not working. HOT 1
- Setup Issue
- Generate A Container?
- Cannot read property 'apply' of undefined
- Missing node modules when deploying to Heroku HOT 1
- impossible to use any node package added
- How can I set webpack proxy in cfg/base.js
- When you choose Scss in the installation - all generated files are .css
- install warn HOT 1
- "Uncaught SyntaxError: Unexpected token <" on Production Server
- React Version is Old
- Error trying to run npm run dist
- How can auto open the browser?
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 generator-react-webpack.