kimroen / ember-cli-coffeescript

Adds precompilation of CoffeeScript files and all the basic generation types to the ember generate command.
MIT License
72 stars 49 forks source link

update acceptance test generator #51

Closed fivetanley closed 9 years ago

fivetanley commented 9 years ago

Newer versions of QUnit use the return value of setup and teardown to wait for promises if the return value has a .then function. Coffeescript has implicit return so it returns the Application instance by default. There are a few problems with this:

1) Ember.Application.then is deprecated 2) The promise never resolves if you are calling visit/etc in the test block. The code to make the promise resolved can't run before setup is done (test waits for setup).

This fixes ember generate acceptance-test hanging by default.

kimroen commented 9 years ago

Thanks!

You can choose to not return anything by ending the function with just return - maybe that is better in this case? Example.

taddeimania commented 9 years ago

Thanks for this - it was causing my integration tests to hang. Glad to see a fix so fast.

kimroen commented 9 years ago

Thanks again! :+1:

kimroen commented 9 years ago

Published as version 0.8.1, with some other small bugfixes.