angular.js/test
Igor Minar 42af8eada2 fix(mocks): $timeout#flush should not update time when empty
When $timeout#flush is called with a delay and no task can be flushed within that
delay, the current time should not be updated as that gets the mock into an inconsistent
state.

BREAKING CHANGE: if a tests was written around the buggy behavior the delays might be off now

This would typically not be a problem, but because of the previous breaking change in
$timeout.flush, the combination of two might be confusing and that's why we are documenting
it.

Old behavior:

```
doSomething(); //schedules task to execute in 500ms from now
doOtherStuff(); //schedules task to execute in 600ms from now

try {
  $timeout.flush(300); // throws "no task to be flushed" exception
} catch(e) {};
$time.flush(200); //flushes only doSomething() task
```

New behavior:

```
doSomething(); //schedules task to execute in 500ms from now
doOtherStuff(); //schedules task to execute in 600ms from now

try {
  $timeout.flush(300); // throws "no task to be flushed" exception
} catch(e) {};
$time.flush(200); // throws "no task to be flushed" exception again
                  // because previous exception didn't move the time forward
```

Fixed test:

```
doSomething(); //schedules task to execute in 500ms from now
doOtherStuff(); //schedules task to execute in 600ms from now

try {
  $timeout.flush(300); // throws "no task to be flushed" exception
} catch(e) {};
$time.flush(500); // flushes only doSomething() task
```
2013-08-25 14:46:55 -07:00
..
auto feat(minerr): log minerr doc url in development 2013-08-15 13:23:18 -07:00
helpers chore: reorganize test helper files under test/helpers 2013-08-23 15:46:11 -07:00
ng feat(mocks): make $timeout#flush throw an exception when empty 2013-08-25 14:46:54 -07:00
ngAnimate test(docs): disable brittle tests that need to be rewritten 2013-08-25 14:46:54 -07:00
ngCookies feat($cookieStore): $cookieStore.get now parses blank string as blank string 2013-05-08 10:04:07 +01:00
ngMock fix(mocks): $timeout#flush should not update time when empty 2013-08-25 14:46:55 -07:00
ngResource test: rename / remove duplicate unit tests 2013-08-23 12:43:42 -07:00
ngRoute feat(minerr): log minerr doc url in development 2013-08-15 13:23:18 -07:00
ngSanitize fix(sanitize): match URI schemes case-insensitively 2013-07-12 09:29:21 +01:00
ngScenario feat(scenario): expose jQuery for usage outside of angular scenario 2013-07-31 15:50:12 -07:00
ngTouch chore(ngMobile): rename module ngTouch and file to angular-touch.js 2013-08-09 11:54:35 -07:00
AngularSpec.js test: rename / remove duplicate unit tests 2013-08-23 12:43:42 -07:00
ApiSpecs.js feat(ngRepeat): add support for custom tracking of items 2013-03-29 23:01:52 -07:00
BinderSpec.js feat(minerr): log minerr doc url in development 2013-08-15 13:23:18 -07:00
jqLiteSpec.js feat(minerr): log minerr doc url in development 2013-08-15 13:23:18 -07:00
jquery_alias.js fix(specs): fix jQuery to jqLite binding on IE8 2011-09-16 02:44:33 +02:00
jquery_remove.js fix(specs): fix jQuery to jqLite binding on IE8 2011-09-16 02:44:33 +02:00
jQueryPatchSpec.js feat(jqLite): switch bind/unbind to more recent jQuery on/off 2013-06-19 20:53:24 +01:00
loaderSpec.js feat(minerr): log minerr doc url in development 2013-08-15 13:23:18 -07:00
minErrSpec.js feat(minerr): log minerr doc url in development 2013-08-15 13:23:18 -07:00