I extracted mock $log factory into stand alone function, so we can access it and test, because this service is rewritten by real service during testing, so we can't access it through angular.$service('$log')...
- split mocks between angular-mocks.js and mocks.js
- src/angular-mocks.js now contains only mocks that we want to ship
- test/mocks.js contains mocks that we use internally for testing
angular
- created angular.mock namespace
- created public $exceptionHandler mock rethrows errors
- created public $log mock stores all logs messages in an array that can
be accessed to make assertions
- internally we now have factory to create $exceptionHandler
that we can assert on
- internally we also keep track of all messages logged and
fail tests if messages were not expected and cleaned up (checked
via global beforeEach and afterEach)
- updated RakeFile and docs reader.js to point to the new
angular-mocks.js location
- made real $exceptionHandler and $log factories accessible from tests
and simplified their specs
- fixed typos in several spec descriptions
- added log assertions throughout the test suite
- this change is needed because of previously reverted $route changes
that used to propagate evals automatically.
- also added docs to highlight how the eval propagation works
This reverts commit 17ee0f031a.
this and a5eb3ed1 introduced scope leakage that can't be resolved
until we fix up scope relationships and eval propagation.
I'm reverting both this and a5eb3ed1 until we can properly address
the issue.
- retrieveScope run into infinite loop if called on DOM tree
that doesn't contain scope reference (happens only with jQuery)
- added missing specs for retrieveScope function
select (one/multiple) could not chose from a list of objects, since DOM requires string ids.
Solved by adding index formatter, which exposed incorrect handling of formatters in select
widgets.
- don't update browser before and after eval instead
- sync location properties before eval
- sync location properties and update browser after eval
- added tests
- symplified the code
- removed $location.toString() because it was not idempotent and useless
This resolves the issue with issuing two $route.onHashChange calls
when the $location was updated with a hashPath that needs to be encoded