Please sign in to comment.
In tests, replace async methods with sync versions
This approach is an experimental attempt to allow tests to make assertions about the side-effects of asynchronous methods without having to explicitly declare a run loop using Ember.run. Now, any method that would trigger an autorun will instead wrap a run loop around its invocation (assuming that you have not already created a run loop). This means that if your async method makes other async calls downstack, those calls will still retain async behavior, but the top-level entry point will become synchronous.
- Loading branch information...
Showing with 285 additions and 180 deletions.
- +5 −9 packages/ember-data/tests/integration/app_test.js
- +3 −9 packages/ember-data/tests/integration/associations_test.js
- +1 −3 packages/ember-data/tests/integration/store_adapter_test.js
- +1 −3 packages/ember-data/tests/unit/many_array_test.js
- +11 −33 packages/ember-data/tests/unit/model_test.js
- +17 −16 packages/ember-data/tests/unit/record_array_test.js
- +9 −6 packages/ember-data/tests/unit/rest_adapter_test.js
- +1 −3 packages/ember-data/tests/unit/store_test.js
- +8 −26 packages/ember-data/tests/unit/transaction_test.js
- +148 −67 packages/ember/lib/main.js
- +81 −5 tests/index.html
Oops, something went wrong.