trainyard / generator-choo

A Yeoman generator for Choo.
https://www.npmjs.com/package/generator-choo
MIT License
10 stars 0 forks source link

Add unit testing #8

Open MattMcFarland opened 8 years ago

MattMcFarland commented 8 years ago

Need to add unit testing to the generators. But not sure what to use. Seems choo community is fond of tap / tape - but I have most experience using mocha and chai. Any thoughts?

YerkoPalma commented 8 years ago

I think that would be great if the choo generator ask about what testing environment would the user want and offer some options like tape, ava, mocha/chai, karma/jasmine or others. Maybe in some near future also add some e2e tests using casper or nightwatch.

MattMcFarland commented 8 years ago

Great ideas.. another thing, what directory? I specifically like using sub directories like this:

models/todos.js
models/__tests__/todos.js

My second choice is

models/todos.js
models.todos.spec.js

But I really dont like creating a separate tests folder as it makes it harder to find tests imho of course.. I still think it should be a community decision :)

YerkoPalma commented 8 years ago

Talking about tests, it might worth to look at https://github.com/mantoni/choo-test. Is a sinon based choo test library

MattMcFarland commented 8 years ago

It looks pretty good, I am impressed with how light-weight it is.. Just might use it as the default option!

hzlmn commented 8 years ago

@MattMcFarland is it in development? Can look on this if no...