Closed zvictor closed 8 years ago
I need help to make Mocha ignore the jasminePattern. Any idea on how we can make it work like that?
@zvictor
maybe for Mocha you can try using something like this:
**/!(*_spec|*-spec|*Spec).js
Currently you can only specify another path for the mocha specs with --path. There is no option to specify a pattern. Maybe /tests/features/mocha and /tests/features/jasmine?
@Sanjo it could be like you said, even though I would prefer to put mocha and jasmine together. We already require jasmine files to follow a pattern, why would we require it to be in a separated folder as well? It looks like a redundant requirement.
Furthermore I don't see why anyone would use all of them together. The idea here is to give the developers more options, and if cucumber is not enough either jasmine or mocha should be used, but not both together. So putting your extra tests in features
would be the natural solution. We just need to be smart at detecting what technology to use when running the tests.
@And-re I don't think we can use a pattern like that anywhere in our scripts. It seems that we would need to change something on Chimpjs first.
@sanjo what do you think about the new organisation of the scripts and its functions? Is this the way we want to have it?
We already require jasmine files to follow a pattern, why would we require it to be in a separated folder as well? It looks like a redundant requirement.
The spec ending pattern does not indicate explicitly that it is a Jasmine spec. It could also be a Mocha spec.
Furthermore I don't see why anyone would use all of them together.
Yeah, me too. I think you would only use Jasmine or Mocha, not both. So I think only having Jasmine or Mocha tests as example for the best practices makes a bit more sense.
what do you think about the new organisation of the scripts and its functions? Is this the way we want to have it?
I only had a very quick look. I think the scripts in this repo could be published as a npm package.
I think the scripts in this repo could be published as a npm package
That!
Closing this as new version coming soon here: https://github.com/xolvio/qualityfaster/tree/dev
Run mocha, jasmine and cucumber...
... while starting Meteor only once. This PR also includes a refactor of the scripts inside
.scripts/
.Structure:
/tests/specifications
and/tests/step_definitions
./tests/features
and should respect thejasmineConfig.specFiles
pattern (**/*@(_spec|-spec|Spec).@(js|jsx)
)./tests/features
, _as long as they are not ended with_spec
,-spec
orSpec
- the Jasmine pattern mentioned above_. [ ! ][ ! ] Mocha loading is still WIP. Please check it here
Usage:
npm test
as before. It runs the tests for Mocha, Jasmine and Cucumber, in this order.npm start
works exactly as before, running Cucumber scenarios with the@focus
tag.npm start -- --mocha
to run Mocha scenarios with the@focus
tag.npm start -- --jasmine
to run Jasmine scenarios with the@focus
tag.