This repository has been archived by the owner on Nov 11, 2017. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly
expectDeprecation
when test
parameter is a function
`Ember.deprecate` is called with `(message, test, options)`. When `test` is falsy or a function that evaluates to falsy, the deprecation is issued. `expectDeprecation` was correctly evaluating the `test` param when it is a function, but not pushing the correct result of that function into `actuals`. This made using `expectDeprecate` fail for a deprecation that used a test function. Example: ``` // Ember code function foo() { Ember.deprecate('message', function() { return false; }); } // test code -- this test would erroneously fail because // expectDeprecation pushes ['message', function() { return false; }] // onto actuals instead of ['message', false] expectDeprecation(function() { foo(); }, 'message'); ```
- Loading branch information