xolvio / qualityfaster

An example project showing how to create robust and maintainable acceptance tests
262 stars 58 forks source link

Run Mocha, Jasmine and Cucumber #46

Closed zvictor closed 8 years ago

zvictor commented 8 years ago

Run mocha, jasmine and cucumber...

... while starting Meteor only once. This PR also includes a refactor of the scripts inside .scripts/.

Structure:

[ ! ] Mocha loading is still WIP. Please check it here

Usage:

zvictor commented 8 years ago

I need help to make Mocha ignore the jasminePattern. Any idea on how we can make it work like that?

And-re commented 8 years ago

@zvictor maybe for Mocha you can try using something like this: **/!(*_spec|*-spec|*Spec).js

ghost commented 8 years ago

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?

zvictor commented 8 years ago

@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?

ghost commented 8 years ago

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.

samhatoum commented 8 years ago

I think the scripts in this repo could be published as a npm package

That!

samhatoum commented 8 years ago

Closing this as new version coming soon here: https://github.com/xolvio/qualityfaster/tree/dev