mocha-eslint | Run ESLint in mocha tests | Code Analyzer library
kandi X-RAY | mocha-eslint Summary
kandi X-RAY | mocha-eslint Summary
Run ESLint in mocha tests
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of mocha-eslint
mocha-eslint Key Features
mocha-eslint Examples and Code Snippets
Community Discussions
Trending Discussions on mocha-eslint
QUESTION
I would like to do the same with Mocha that I can with Karma+Webpack: Eslint the code before running the tests, and do this in watch mode (watching the files for changes), so the eslint+tests would rerun on every save.
Watching with Karma works like this: Karma has the autoWatch option, that watches files for changes. Eslint comes into picture because the client code that is tested with Karma is first processed with webpack which runs eslint on it (with eslint-loader).
Mocha has --watch option, so I can do mocha test --watch
to rerun test on file changes.
Eslint has eslint-watch, so I can do esw test --watch
to rerun eslint on file changes.
There is mocha-eslint (needs configuration) and eslint-mocha (no configuration needed), both include eslint in testing, but without having the watch option they are as good as running eslint test && mocha test
.
Did something miss my attention? Is there already an existing solution out there? Or is there a way around this?
Thanks in advance!
...ANSWER
Answered 2017-Aug-08 at 12:17You can try it with concurrently.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install mocha-eslint
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page