aboutsummaryrefslogtreecommitdiffstats
path: root/test/angular-mocks.js
AgeCommit message (Collapse)Author
2011-01-26split mocks and create $log and $exceptionHandler mocksIgor Minar
- 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
2011-01-13significant rewrite of the $location serviceIgor Minar
- 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
2011-01-10Rename angular.foreach to angular.forEach to make the api consistent.Igor Minar
camelcase is used for other angular functions and forEach is also used by EcmaScript standard. - rename the internal as well as the external function name - tweak the implementation of the function so that it doesn't clober it self when we extend the angular object with an object that has a forEach property equal to this forEach function Closes #85
2011-01-07$location service should utilize onhashchange events instead of pollingIgor Minar
2010-12-06add $browser.defer and $defer service and fix async xhr cache issueIgor Minar
- Closes #152 ($resource().query() sometimes calls callback before returning, and it shouldn't) - add $browser.defer method - add $defer service - integrate $browser.defer with outstandingRequests counter in $browser - fix all old tests that relied on buggy behavior
2010-11-08TzDate should support various UTC methodsIgor Minar
2010-10-26Reverted change 841013a4c4d25acf6fc9ff40e449c3d0a4b82ec3 which does not work ↵Misko Hevery
on all browsers
2010-10-26Add TzDate to angular-mocks.jsIgor Minar
TzDate is a Date-like type that is independent from the timezone settings of the machine on which TzDate instances are created. This property makes it ideal for testing code that deals with timezones in a manner that makes the code portable between timezones. Closes #81
2010-10-13fixing reference issue in angular-mocks.jsIgor Minar
2010-10-07Change angular-mocks to throw errors on unexpected gets in the format JSTD ↵Shyam Seshadri
now expects
2010-10-01angular-mocks code should access all global functions via angularIgor Minar
mocks must use angular.foo because the final build will hide all the normally accessible functions within an anonymous closure.
2010-09-27Reworked the cookie synchronization between cookie service, $browser and ↵Igor Minar
document.cookie. Now we finally correctly handle situations when browser refuses to set a cookie, due to storage quota or other (file:// protocol) limitations.
2010-09-26Properly initialize cookie service in order to preserve existing cookiesIgor Minar
- previously the poller initialized the cookie cache too late which was causing previously existing cookies to be deleted by cookie service - refactored the poller api so that the addPollFn returns the added fn - fixed older cookie service tests - removed "this.$onEval(PRIORITY_LAST, update);" because it is not needed
2010-09-23$cookies service refactoringIgor Minar
- remove obsolete code in tests - add warning logs when maximum cookie limits (as specified via RFC 2965) were reached - non-string values will now get dropped - after each update $cookies hash will reflect the actual state of browser cookies this means that if browser drops some cookies due to cookie overflow, $cookies will reflect that - $sessionStore got renamed to $cookieStore to avoid name conflicts with html5's sessionStore
2010-09-22Refactored the Browser:Misko Hevery
- change from using prototype to inner functions to help with better compression - removed watchers (url/cookie) and introduced a poller concept - moved the checking of URL and cookie into services which register with poolers Benefits: - Smaller minified file - can call $browser.poll() from tests to simulate polling - single place where setTimeout needs to be tested - More testable $browser
2010-09-14Adding cookie serviceMisko Hevery
- Browser.cookies() - MockBrowser - $cookie service - $sessionStore
2010-07-22added jsonp to resourcesMisko Hevery
2010-05-19fixed isNumber to angular.isNumber for mocks outside of angularMisko Hevery
2010-05-19added error handler to xhr requestsMisko Hevery
2010-05-07xhr bulk fixesMisko Hevery
2010-04-27resources now use browser mockMisko Hevery
2010-04-15added $route serviceMisko Hevery
2010-04-08tests failing jstd to show coryMisko Hevery
2010-04-05added hover serviceMisko Hevery
2010-04-05added ng:includeMisko Hevery
2010-04-05added ng:switch widgetMisko Hevery