Skip to content

Commit 6bc6634

Browse files
chore(ngVersion): update to 1.2.10
1 parent ab054c9 commit 6bc6634

File tree

3 files changed

+147
-78
lines changed

3 files changed

+147
-78
lines changed

Gruntfile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = function(grunt) {
1616
grunt.util.linefeed = '\n';
1717

1818
grunt.initConfig({
19-
ngversion: '1.2.8',
19+
ngversion: '1.2.10',
2020
bsversion: '3.0.3',
2121
modules: [],//to be filled in by build task
2222
pkg: grunt.file.readJSON('package.json'),

misc/test-lib/angular-mocks.js

+33-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license AngularJS v1.2.8
2+
* @license AngularJS v1.2.10
33
* (c) 2010-2014 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
@@ -386,7 +386,7 @@ angular.mock.$LogProvider = function() {
386386
*
387387
* @example
388388
* <pre>
389-
* $log.log('Some Error');
389+
* $log.error('Some Error');
390390
* var first = $log.error.logs.unshift();
391391
* </pre>
392392
*/
@@ -763,6 +763,36 @@ angular.mock.TzDate = function (offset, timestamp) {
763763
angular.mock.TzDate.prototype = Date.prototype;
764764
/* jshint +W101 */
765765

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+
766796
angular.mock.animate = angular.module('mock.animate', ['ng'])
767797

768798
.config(['$provide', function($provide) {
@@ -1706,7 +1736,7 @@ angular.mock.$RootElementProvider = function() {
17061736
* In addition, ngMock also extends various core ng services such that they can be
17071737
* inspected and controlled in a synchronous manner within test code.
17081738
*
1709-
* {@installModule mocks}
1739+
* {@installModule mock}
17101740
*
17111741
* <div doc-module-components="ngMock"></div>
17121742
*
@@ -1920,7 +1950,6 @@ angular.mock.clearDataCache = function() {
19201950
};
19211951

19221952

1923-
19241953
if(window.jasmine || window.mocha) {
19251954

19261955
var currentSpec = null,

0 commit comments

Comments
 (0)