derbyparty/generator-derby — pull request #3 by bollwyvl (2014-06-26 02:42:23+00:00)
Title: Testing for derby:app and derby:component (as package)

Also a bit of linting.

This could be considered work-in-progress if we don't want to merge until there is also a bundled component suite... need to do a bit more work before that works properly.

Here's a [failing build](https://travis-ci.org/bollwyvl/generator-derby/builds/28465279
), and then a [fix](https://travis-ci.org/bollwyvl/generator-derby/builds/28465701) (coffee whitespace and line length).

`npm test` will now:
- lint the generator files and tests
- this doesn't work on travis yet...
- check if the expected files are created (cheating, in that this list is made from the list of what it IS making)
- will try stylus, coffee and jade individually (but not the full factorial)
- lint those generated files
- css: recess
- js: jshint
- json: jsonlint (basically parse, but with better output)
- coffee: coffeelint
- jade: derby-jade (can't seem to make this fail...)
- styl: stylus (just tries to render)... maybe style -> recess?

The output from the linting is not great... still figuring out how best to collect all of that information cleanly.

There is no real way to validate derby html templates, and therefore the output of derby-jade... short of actually firing up a derby app.

Eventually, as I mentioned, minimal test cases should be generated... and then run: travis can do [mongo and redis](http://docs.travis-ci.com/user/database-setup/), so there's really no reason to not have the generators show best (any?!) practices for integration testing. However, I think this is a start!