<feed xmlns='http://www.w3.org/2005/Atom'>
<title>angular.js/test/ngMock, branch v1.2.0-rc.2</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/'/>
<entry>
<title>feat(ngMock): allow passing an object literal as shorthand to module</title>
<updated>2013-09-03T21:22:12+00:00</updated>
<author>
<name>Merrick Christensen</name>
</author>
<published>2013-08-26T05:45:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=f737c97df02918eb5b19bf5c8248fa3e20f9b361'/>
<id>f737c97df02918eb5b19bf5c8248fa3e20f9b361</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>revert: feat(mocks): make $timeout#flush throw an exception when empty</title>
<updated>2013-08-28T00:23:36+00:00</updated>
<author>
<name>Igor Minar</name>
</author>
<published>2013-08-28T00:20:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=4114f9c21bec5a396e59954dfc42d2c96527ac3d'/>
<id>4114f9c21bec5a396e59954dfc42d2c96527ac3d</id>
<content type='text'>
This reverts commit cbf06a5d64aba537f0e2679a194d3998d8365493.

This turned out to be a bad idea because it allow us to fast-forward
the wall clock time (see previous commit).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit cbf06a5d64aba537f0e2679a194d3998d8365493.

This turned out to be a bad idea because it allow us to fast-forward
the wall clock time (see previous commit).
</pre>
</div>
</content>
</entry>
<entry>
<title>revert: fix(mocks): $timeout#flush should not update time when empty</title>
<updated>2013-08-28T00:21:11+00:00</updated>
<author>
<name>Igor Minar</name>
</author>
<published>2013-08-28T00:20:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=70b44ad32a79e0746e19a74bde35f49c79f89942'/>
<id>70b44ad32a79e0746e19a74bde35f49c79f89942</id>
<content type='text'>
This reverts commit 42af8eada2803a54a98b4f792e60feb480d68a0c.

This turned out to be a bad idea as it prevents us from moving the
time forward and asserting that the component state didn't change
due to the scheduled task executing too early.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 42af8eada2803a54a98b4f792e60feb480d68a0c.

This turned out to be a bad idea as it prevents us from moving the
time forward and asserting that the component state didn't change
due to the scheduled task executing too early.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(mocks): $timeout#flush should not update time when empty</title>
<updated>2013-08-25T21:46:55+00:00</updated>
<author>
<name>Igor Minar</name>
</author>
<published>2013-08-25T21:36:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=42af8eada2803a54a98b4f792e60feb480d68a0c'/>
<id>42af8eada2803a54a98b4f792e60feb480d68a0c</id>
<content type='text'>
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
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
```
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(mocks): make $timeout#flush throw an exception when empty</title>
<updated>2013-08-25T21:46:54+00:00</updated>
<author>
<name>Igor Minar</name>
</author>
<published>2013-08-24T21:18:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=cbf06a5d64aba537f0e2679a194d3998d8365493'/>
<id>cbf06a5d64aba537f0e2679a194d3998d8365493</id>
<content type='text'>
When calling $timeout.flush with or without a delay an exception should
be thrown if there is nothing to be flushed.

This prevents tests from flushing stuff unnecessarily.

BREAKING CHANGE: calling $timeout.flush(delay) when there is no task to be flushed
within the delay throws an exception now.

Please adjust the delay or remove the flush call from your tests as the exception
is a signed of a programming error.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When calling $timeout.flush with or without a delay an exception should
be thrown if there is nothing to be flushed.

This prevents tests from flushing stuff unnecessarily.

BREAKING CHANGE: calling $timeout.flush(delay) when there is no task to be flushed
within the delay throws an exception now.

Please adjust the delay or remove the flush call from your tests as the exception
is a signed of a programming error.
</pre>
</div>
</content>
</entry>
<entry>
<title>test: rename / remove duplicate unit tests</title>
<updated>2013-08-23T19:43:42+00:00</updated>
<author>
<name>Vojta Jina</name>
</author>
<published>2013-08-20T21:41:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=b89a4e49b922894f93d5cc69e00016f157dee625'/>
<id>b89a4e49b922894f93d5cc69e00016f157dee625</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(ngMock/$httpBackend):  support a matching function for data param</title>
<updated>2013-08-06T15:54:50+00:00</updated>
<author>
<name>Ken Chen</name>
</author>
<published>2013-08-06T15:53:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=08daa7797bce5207916251d4a0ab3d5c93e5529a'/>
<id>08daa7797bce5207916251d4a0ab3d5c93e5529a</id>
<content type='text'>
Add support for passing function as validating data:
 - To avoid hacking test method of RegExp
 - Optionally overwrite `toString` method of fn to show validation tips
 - change docs: param description for `when`, `whenPost`, `whenPut`,
   `expect`, `expectPost`, `expectPut`, `expectPATCH`

Closes: #2981
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for passing function as validating data:
 - To avoid hacking test method of RegExp
 - Optionally overwrite `toString` method of fn to show validation tips
 - change docs: param description for `when`, `whenPost`, `whenPut`,
   `expect`, `expectPost`, `expectPut`, `expectPATCH`

Closes: #2981
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(ngMock): keep withCredentials on passThrough</title>
<updated>2013-08-01T23:07:33+00:00</updated>
<author>
<name>Étienne Barrié</name>
</author>
<published>2013-07-31T12:50:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=3079a6f4e097a777414b8c3a8a87b8e1e20b55b5'/>
<id>3079a6f4e097a777414b8c3a8a87b8e1e20b55b5</id>
<content type='text'>
When using passThrough() and specifying withCredentials on the $http
call, the option is now passed to the underlying $httpBackend.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using passThrough() and specifying withCredentials on the $http
call, the option is now passed to the underlying $httpBackend.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(mock.$log): keep in sync with $log</title>
<updated>2013-07-31T20:38:24+00:00</updated>
<author>
<name>Chirayu Krishnappa</name>
</author>
<published>2013-07-31T18:53:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=f274c0a66b28711d3b9cc7b0775e97755dd971e8'/>
<id>f274c0a66b28711d3b9cc7b0775e97755dd971e8</id>
<content type='text'>
Closes #2343
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes #2343
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(ngMock): $timeout.flushNext can expect specific timeout delays</title>
<updated>2013-07-26T15:57:25+00:00</updated>
<author>
<name>Matias Niemelä</name>
</author>
<published>2013-07-25T03:22:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=462ed033d512ae94cb188efc9453de84ace4e17e'/>
<id>462ed033d512ae94cb188efc9453de84ace4e17e</id>
<content type='text'>
the $timeout mock's flush method allows flushing queued up requests
but doesn't allow to for checking with what delay a task was queued
up. flushNext flushes the next queued up task and can asserts the
scheduled delay.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the $timeout mock's flush method allows flushing queued up requests
but doesn't allow to for checking with what delay a task was queued
up. flushNext flushes the next queued up task and can asserts the
scheduled delay.
</pre>
</div>
</content>
</entry>
</feed>
