|
1 | 1 | /**
|
2 |
| - * @license AngularJS v1.2.8 |
| 2 | + * @license AngularJS v1.2.10 |
3 | 3 | * (c) 2010-2014 Google, Inc. http://angularjs.org
|
4 | 4 | * License: MIT
|
5 | 5 | */
|
@@ -386,7 +386,7 @@ angular.mock.$LogProvider = function() {
|
386 | 386 | *
|
387 | 387 | * @example
|
388 | 388 | * <pre>
|
389 |
| - * $log.log('Some Error'); |
| 389 | + * $log.error('Some Error'); |
390 | 390 | * var first = $log.error.logs.unshift();
|
391 | 391 | * </pre>
|
392 | 392 | */
|
@@ -763,6 +763,36 @@ angular.mock.TzDate = function (offset, timestamp) {
|
763 | 763 | angular.mock.TzDate.prototype = Date.prototype;
|
764 | 764 | /* jshint +W101 */
|
765 | 765 |
|
| 766 | +// TODO(matias): remove this IMMEDIATELY once we can properly detect the |
| 767 | +// presence of a registered module |
| 768 | +var animateLoaded; |
| 769 | +try { |
| 770 | + angular.module('ngAnimate'); |
| 771 | + animateLoaded = true; |
| 772 | +} catch(e) {} |
| 773 | + |
| 774 | +if(animateLoaded) { |
| 775 | + angular.module('ngAnimate').config(['$provide', function($provide) { |
| 776 | + var reflowQueue = []; |
| 777 | + $provide.value('$$animateReflow', function(fn) { |
| 778 | + reflowQueue.push(fn); |
| 779 | + return angular.noop; |
| 780 | + }); |
| 781 | + $provide.decorator('$animate', function($delegate) { |
| 782 | + $delegate.triggerReflow = function() { |
| 783 | + if(reflowQueue.length === 0) { |
| 784 | + throw new Error('No animation reflows present'); |
| 785 | + } |
| 786 | + angular.forEach(reflowQueue, function(fn) { |
| 787 | + fn(); |
| 788 | + }); |
| 789 | + reflowQueue = []; |
| 790 | + }; |
| 791 | + return $delegate; |
| 792 | + }); |
| 793 | + }]); |
| 794 | +} |
| 795 | + |
766 | 796 | angular.mock.animate = angular.module('mock.animate', ['ng'])
|
767 | 797 |
|
768 | 798 | .config(['$provide', function($provide) {
|
@@ -1706,7 +1736,7 @@ angular.mock.$RootElementProvider = function() {
|
1706 | 1736 | * In addition, ngMock also extends various core ng services such that they can be
|
1707 | 1737 | * inspected and controlled in a synchronous manner within test code.
|
1708 | 1738 | *
|
1709 |
| - * {@installModule mocks} |
| 1739 | + * {@installModule mock} |
1710 | 1740 | *
|
1711 | 1741 | * <div doc-module-components="ngMock"></div>
|
1712 | 1742 | *
|
@@ -1920,7 +1950,6 @@ angular.mock.clearDataCache = function() {
|
1920 | 1950 | };
|
1921 | 1951 |
|
1922 | 1952 |
|
1923 |
| - |
1924 | 1953 | if(window.jasmine || window.mocha) {
|
1925 | 1954 |
|
1926 | 1955 | var currentSpec = null,
|
|
0 commit comments