<feed xmlns='http://www.w3.org/2005/Atom'>
<title>angular.js/test/ngMock, branch g3_v1_2</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/'/>
<entry>
<title>test(ngMock): workaround issue with negative timestamps</title>
<updated>2014-03-19T04:31:20+00:00</updated>
<author>
<name>Brett Porter</name>
</author>
<published>2014-03-18T04:36:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=d4ac25496aaace2b85aa9f5e5232e5eabeb40c63'/>
<id>d4ac25496aaace2b85aa9f5e5232e5eabeb40c63</id>
<content type='text'>
In some specific timezones and operating systems, it seems that
getTimezoneOffset() can return an incorrect value for negative timestamps, as
described in #5017. While this isn't something easily fixed in the mock code,
the tests can avoid that particular timeframe by using a positive timestamp.

Closes #5017
Closes #6730
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In some specific timezones and operating systems, it seems that
getTimezoneOffset() can return an incorrect value for negative timestamps, as
described in #5017. While this isn't something easily fixed in the mock code,
the tests can avoid that particular timeframe by using a positive timestamp.

Closes #5017
Closes #6730
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(ngMock): return false from mock $interval.cancel() when no argument is supplied</title>
<updated>2014-02-05T00:41:25+00:00</updated>
<author>
<name>Daniel Luxemburg</name>
</author>
<published>2014-02-04T01:04:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=dd24c78373b5d24ecb3b9d19e61e1b3b6c74d155'/>
<id>dd24c78373b5d24ecb3b9d19e61e1b3b6c74d155</id>
<content type='text'>
Closes #6103.
Closed #6099.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes #6103.
Closed #6099.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(mocks): always call functions injected with `inject` with `this` set to the current spec</title>
<updated>2014-02-04T06:25:30+00:00</updated>
<author>
<name>Wes Alvaro</name>
</author>
<published>2014-02-04T00:53:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=3bf43903397c703aa2e9ba1e1a48dbc9e8286ee2'/>
<id>3bf43903397c703aa2e9ba1e1a48dbc9e8286ee2</id>
<content type='text'>
Currently when a function is injected inside of a test we set the context to undefined which
is a bug.

Closes #6102
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently when a function is injected inside of a test we set the context to undefined which
is a bug.

Closes #6102
</pre>
</div>
</content>
</entry>
<entry>
<title>test(ngMock): fix the tests to not use global msie</title>
<updated>2014-01-07T03:08:05+00:00</updated>
<author>
<name>Vojta Jina</name>
</author>
<published>2014-01-07T03:08:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=affcbad501ad5e17b8cb30ad8a2c0d1de6686722'/>
<id>affcbad501ad5e17b8cb30ad8a2c0d1de6686722</id>
<content type='text'>
My bad when merging 7e916455b36dc9ca4d4afc1e44cade90006d00e3.

These tests are run with compiled Angular and then the msie is not defined.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
My bad when merging 7e916455b36dc9ca4d4afc1e44cade90006d00e3.

These tests are run with compiled Angular and then the msie is not defined.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(ngMock window.inject): Remove Error 'stack' property changes</title>
<updated>2014-01-07T01:47:06+00:00</updated>
<author>
<name>Andrew C. Greenberg</name>
</author>
<published>2013-11-20T06:53:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=7e916455b36dc9ca4d4afc1e44cade90006d00e3'/>
<id>7e916455b36dc9ca4d4afc1e44cade90006d00e3</id>
<content type='text'>
Recent browsers, particularly PhantomJS 1.9.2 and Safari 7.0
treat the stack property as non-configurable and unwritable.

Because window.inject captures the stack at the time of the inject,
and attempts to insert it into a captured throw from the injected
function by modifying e.stack, a meaningless error message and
stack is thrown instead.

This commit inserts two tests exposing the problem, and implements
a proposed solution that builds a new error-like object that mimicks
the old Error object, but with the additional stack information, and
captures the toString function from the Error object prototype.  This
appears to work for the browsers suppoerted here.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Recent browsers, particularly PhantomJS 1.9.2 and Safari 7.0
treat the stack property as non-configurable and unwritable.

Because window.inject captures the stack at the time of the inject,
and attempts to insert it into a captured throw from the injected
function by modifying e.stack, a meaningless error message and
stack is thrown instead.

This commit inserts two tests exposing the problem, and implements
a proposed solution that builds a new error-like object that mimicks
the old Error object, but with the additional stack information, and
captures the toString function from the Error object prototype.  This
appears to work for the browsers suppoerted here.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(angular-mocks): use copy of mock data in $httpBackend</title>
<updated>2013-12-11T23:18:45+00:00</updated>
<author>
<name>Karl Seamon</name>
</author>
<published>2013-12-06T19:35:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=f69dc16241c8b631123ad0b09674f0a5e0ff32fe'/>
<id>f69dc16241c8b631123ad0b09674f0a5e0ff32fe</id>
<content type='text'>
Copy mock data returned from the mock $httpBackend.
This prevents modifications to the response from affecting future responses.
Previously, this misbehavior was being mitigated by the deep copy in $resource, but that no longer exists.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Copy mock data returned from the mock $httpBackend.
This prevents modifications to the response from affecting future responses.
Previously, this misbehavior was being mitigated by the deep copy in $resource, but that no longer exists.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(ngMock): fixes httpBackend expectation with body object</title>
<updated>2013-11-22T06:57:15+00:00</updated>
<author>
<name>Corey Burrows</name>
</author>
<published>2013-11-14T14:42:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=4d16472b918a3482942d76f1e273a5aa01f65e83'/>
<id>4d16472b918a3482942d76f1e273a5aa01f65e83</id>
<content type='text'>
Fixes an issue with httpBackend expectations where a given body object
may not match the actual request body if its keys are serialized in a
different order.

Closes #4956
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes an issue with httpBackend expectations where a given body object
may not match the actual request body if its keys are serialized in a
different order.

Closes #4956
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(tests): Correct tests for IE11</title>
<updated>2013-11-22T05:53:09+00:00</updated>
<author>
<name>Tobias Bosch</name>
</author>
<published>2013-11-21T22:30:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=579242346c4202ea58fc2cae6df232289cbea0bb'/>
<id>579242346c4202ea58fc2cae6df232289cbea0bb</id>
<content type='text'>
Some tests were wrong. However, src/* did not contain problems.

Fixes #5046
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some tests were wrong. However, src/* did not contain problems.

Fixes #5046
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(modules): stop leaking global variables in tests</title>
<updated>2013-10-10T18:58:15+00:00</updated>
<author>
<name>Pete Bacon Darwin</name>
</author>
<published>2013-10-10T08:11:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=07272608d8ae39a5dd220cdb5637b1439342d5c3'/>
<id>07272608d8ae39a5dd220cdb5637b1439342d5c3</id>
<content type='text'>
The routeUtils.js file was declaring a number of functions that were
leaking into other modules such as ngMocks causing tests to pass
incorrectly.

Closes #4360
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The routeUtils.js file was declaring a number of functions that were
leaking into other modules such as ngMocks causing tests to pass
incorrectly.

Closes #4360
</pre>
</div>
</content>
</entry>
<entry>
<title>feat($interval): add a service wrapping setInterval</title>
<updated>2013-10-07T20:45:40+00:00</updated>
<author>
<name>Julie</name>
</author>
<published>2013-09-13T19:47:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/angular.js/commit/?id=2b5ce84fca7b41fca24707e163ec6af84bc12e83'/>
<id>2b5ce84fca7b41fca24707e163ec6af84bc12e83</id>
<content type='text'>
The $interval service simplifies creating and testing recurring tasks.
This service does not increment $browser's outstanding request count,
which means that scenario tests and Protractor tests will not timeout
when a site uses a polling function registered by $interval. Provides
a workaround for #2402.

For unit tests, repeated tasks can be controlled using ngMock$interval's
tick(), tickNext(), and tickAll() functions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The $interval service simplifies creating and testing recurring tasks.
This service does not increment $browser's outstanding request count,
which means that scenario tests and Protractor tests will not timeout
when a site uses a polling function registered by $interval. Provides
a workaround for #2402.

For unit tests, repeated tasks can be controlled using ngMock$interval's
tick(), tickNext(), and tickAll() functions.
</pre>
</div>
</content>
</entry>
</feed>
