paypal/generator-kraken — pull request #44 by lmarkus (2014-01-20 07:33:50+00:00)
Title: Fix better testing

There are two things in this PR.

The first is a refactoring of the generator tests. **`utils/generator.js`** changed its signature. Instead of taking six parameters, now it only takes two: An _options_ object, and a _callback_. I believe this change makes it both easier to read, and more expandable should we need to add more parameters for complex test cases in the future. (All the unit tests were refactored to the new signature).

In addition, I stopped using `helpers.createGenerator` and opted for a tweaked version that adds a few aliases to the generator namespaces. This simulates the conditions of a generator being invoked via `yo`.

Second, are two unit tests that invoke `grunt build` and `grunt test` on a generated project. This required adding support for installation of a project's dependencies. Since there wasn't a callback available to let me know when the installation was complete, I leveraged event emitters from within the generator.

These two tests require an extended timeout, since the installation of the project's dependencies takes a bit of time. I currently set it at 2 minutes.