@@ -562,7 +562,7 @@ angular.mock.$IntervalProvider = function() {
562
562
*/
563
563
( function ( ) {
564
564
var R_ISO8061_STR = / ^ ( \d { 4 } ) - ? ( \d \d ) - ? ( \d \d ) (?: T ( \d \d ) (?: \: ? ( \d \d ) (?: \: ? ( \d \d ) (?: \. ( \d { 3 } ) ) ? ) ? ) ? ( Z | ( [ + - ] ) ( \d \d ) : ? ( \d \d ) ) ) ? $ / ;
565
-
565
+
566
566
function jsonStringToDate ( string ) {
567
567
var match ;
568
568
if ( match = string . match ( R_ISO8061_STR ) ) {
@@ -776,7 +776,12 @@ angular.mock.animate = angular.module('mock.animate', ['ng'])
776
776
enabled : $delegate . enabled ,
777
777
flushNext : function ( name ) {
778
778
var tick = animate . queue . shift ( ) ;
779
- expect ( tick . method ) . toBe ( name ) ;
779
+
780
+ if ( ! tick ) throw new Error ( 'No animation to be flushed' ) ;
781
+ if ( tick . method !== name ) {
782
+ throw new Error ( 'The next animation is not "' + name +
783
+ '", but is "' + tick . method + '"' ) ;
784
+ }
780
785
tick . fn ( ) ;
781
786
return tick ;
782
787
}
@@ -1191,7 +1196,7 @@ function createHttpBackendMock($rootScope, $delegate, $browser) {
1191
1196
* @returns {requestHandler } Returns an object with `respond` method that controls how a matched
1192
1197
* request is handled.
1193
1198
*
1194
- * - respond –
1199
+ * - respond –
1195
1200
* `{function([status,] data[, headers])|function(function(method, url, data, headers)}`
1196
1201
* – The respond method takes a set of static data to be returned or a function that can return
1197
1202
* an array containing response status (number), response data (string) and response headers
@@ -2122,4 +2127,4 @@ angular.mock.clearDataCache = function() {
2122
2127
}
2123
2128
}
2124
2129
} ;
2125
- } ) ( window ) ;
2130
+ } ) ( window ) ;
0 commit comments