Comments (5)
so if I can declare in my Gruntfile.js
:
simplemocha: {
all: { src: 'test/*-node.js' }
}
why would I need grep
?
from grunt-simple-mocha.
@ekkis, the grep
option does not filter files, but rather the tests themselves. It's a Mocha option. See Mocha's CLI options:
-g, --grep <pattern> only run tests matching <pattern>
It says "tests", which apparently means the description string of the describe()
blocks.
Mocha will search for the grep
pattern in the test description, and only run those tests that match.
from grunt-simple-mocha.
This repository should really remove the grep
option from the examples. It will only confuse people and cause their setups to not run any tests! Because who writes describe()
blocks containing the string -test
in the test description?
Since the grep will match none of their describe
blocks, then none of their tests will run. So grep
should be removed from the examples.
from grunt-simple-mocha.
ah. that explains why I get 0 passing (0ms)
. LoL. thanks guys
from grunt-simple-mocha.
You're right— this is pretty confusing! Thank you for opening the issue and I'm sorry for the confusion. I've clarified in the docs that it merely passes the options to new Mocha
from grunt-simple-mocha.
Related Issues (20)
- Running from a grunt-regarde task only runs tests on first pass HOT 1
- Should not hide exceptions HOT 7
- var paths = this.filesSrc.map(path.resolve) show the test src path HOT 6
- Simplemocha broke on Grunt 0.4 HOT 4
- Taks cannot be proceeded after upgrading Node to v0.10.x HOT 3
- Feature request: specify destination for results HOT 2
- Setting working directory HOT 1
- Should pass `--grep` from command line
- Using Assertion Libs HOT 1
- Calling path.resolve from tests with "./" relative notation resolves it starting from project's root HOT 1
- Add coffeescript example
- Reporters HOT 4
- The clause(grep: "*-test") in the example Gruntfile.js is likely to misguide users. HOT 1
- Update readme and usage description on npmjs.com HOT 1
- reporter spec won't print stack trace when using simplemocha HOT 1
- How to run mocha in verbose mode? HOT 2
- Expose a way to emulate `-r` option
- Not able to set reporter options when using MochaAwesome as the reporter
- Please update npm dependency: mocha
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-simple-mocha.