<feed xmlns='http://www.w3.org/2005/Atom'>
<title>angular.js/src/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>fix(ngMocks): $logProvider should not use internal APIs</title>
<updated>2013-08-29T19:06:30+00:00</updated>
<author>
<name>Adam de Baugh</name>
</author>
<published>2013-08-29T03:30:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=baaa73ee1ef25fa506ff7aaab3159d710acdafdb'/>
<id>baaa73ee1ef25fa506ff7aaab3159d710acdafdb</id>
<content type='text'>
angular.mocks.$LogProvider $logProvider.debugEnabled(false) is crashing
with undefined when run inside karma/jasmine test runner:

angular.module('foo', []).config(['$logProvider', function ($logProvider) {
  $logProvider.debugEnabled(false);
}]);

Closes #3612</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
angular.mocks.$LogProvider $logProvider.debugEnabled(false) is crashing
with undefined when run inside karma/jasmine test runner:

angular.module('foo', []).config(['$logProvider', function ($logProvider) {
  $logProvider.debugEnabled(false);
}]);

Closes #3612</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>chore(mocks): remove obsolte createMockWindow api</title>
<updated>2013-08-13T17:48:54+00:00</updated>
<author>
<name>Igor Minar</name>
</author>
<published>2013-08-13T16:58:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=0dd062231a4d495133fd907eeae95c566380c6e1'/>
<id>0dd062231a4d495133fd907eeae95c566380c6e1</id>
<content type='text'>
we never released this api, so it's safe to remove
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
we never released this api, so it's safe to remove
</pre>
</div>
</content>
</entry>
<entry>
<title>docs(httpBackend): update documentation for expect methods</title>
<updated>2013-08-09T17:08:36+00:00</updated>
<author>
<name>Santi Albo</name>
</author>
<published>2013-08-09T10:36:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=61cb4085d421060edfb98d7eae0a43b615542843'/>
<id>61cb4085d421060edfb98d7eae0a43b615542843</id>
<content type='text'>
`expect` methods can receive an Object as the data parameter, which was
undocumented.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`expect` methods can receive an Object as the data parameter, which was
undocumented.
</pre>
</div>
</content>
</entry>
<entry>
<title>chore(dump): fix our karma.dump bridge</title>
<updated>2013-08-07T18:21:34+00:00</updated>
<author>
<name>Igor Minar</name>
</author>
<published>2013-08-07T18:20:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=d1cdd4d026968993db9d0130390bb5138b942224'/>
<id>d1cdd4d026968993db9d0130390bb5138b942224</id>
<content type='text'>
previously it didn't work for dumping multiple objects
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
previously it didn't work for dumping multiple objects
</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>
</feed>
