From 9b55a3d8b52740a18b0e5fe605ce1c16ad7a68d2 Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Tue, 20 Feb 2018 11:10:03 +0000 Subject: [PATCH 1/2] test(*): fix references to `tpload` minerr in tests --- test/ng/compileSpec.js | 2 +- test/ng/templateRequestSpec.js | 4 ++-- test/ngRoute/routeSpec.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/ng/compileSpec.js b/test/ng/compileSpec.js index acda50470485..e65b951ff90f 100644 --- a/test/ng/compileSpec.js +++ b/test/ng/compileSpec.js @@ -1917,7 +1917,7 @@ describe('$compile', function() { expect(function() { $httpBackend.flush(); - }).toThrowMinErr('$compile', 'tpload', 'Failed to load template: hello.html'); + }).toThrowMinErr('$templateRequest', 'tpload', 'Failed to load template: hello.html'); expect(sortedHtml(element)).toBe('
'); }) ); diff --git a/test/ng/templateRequestSpec.js b/test/ng/templateRequestSpec.js index 3ca323613103..23f05f1e8d08 100644 --- a/test/ng/templateRequestSpec.js +++ b/test/ng/templateRequestSpec.js @@ -144,9 +144,9 @@ describe('$templateRequest', function() { $templateRequest('tpl.html').catch(function(reason) { err = reason; }); $httpBackend.flush(); - expect(err).toEqualMinErr('$compile', 'tpload', + expect(err).toEqualMinErr('$templateRequest', 'tpload', 'Failed to load template: tpl.html (HTTP status: 404 Not Found)'); - expect($exceptionHandler.errors[0]).toEqualMinErr('$compile', 'tpload', + expect($exceptionHandler.errors[0]).toEqualMinErr('$templateRequest', 'tpload', 'Failed to load template: tpl.html (HTTP status: 404 Not Found)'); }); }); diff --git a/test/ngRoute/routeSpec.js b/test/ngRoute/routeSpec.js index 772bdc7bc226..36832ab57884 100644 --- a/test/ngRoute/routeSpec.js +++ b/test/ngRoute/routeSpec.js @@ -892,7 +892,7 @@ describe('$route', function() { $httpBackend.flush(); expect($exceptionHandler.errors.pop()). - toEqualMinErr('$compile', 'tpload', 'Failed to load template: r1.html'); + toEqualMinErr('$templateRequest', 'tpload', 'Failed to load template: r1.html'); $httpBackend.expectGET('r2.html').respond(''); $location.path('/r2'); From c8f834c39d01d4d9f95d1b1ee9cfa7f81cb7b2e9 Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Tue, 20 Feb 2018 11:13:38 +0000 Subject: [PATCH 2/2] docs($route): fix typo in error message --- docs/content/error/$route/norout.ngdoc | 2 +- src/ngRoute/route.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/error/$route/norout.ngdoc b/docs/content/error/$route/norout.ngdoc index 30a12d151442..5dc5a9b8b7ee 100644 --- a/docs/content/error/$route/norout.ngdoc +++ b/docs/content/error/$route/norout.ngdoc @@ -1,6 +1,6 @@ @ngdoc error @name $route:norout -@fullName Tried updating route when with no current route +@fullName Tried updating route with no current route @description Occurs when an attempt is made to update the parameters on the current route when diff --git a/src/ngRoute/route.js b/src/ngRoute/route.js index 76f915b97da6..f0e6c19b9079 100644 --- a/src/ngRoute/route.js +++ b/src/ngRoute/route.js @@ -605,7 +605,7 @@ function $RouteProvider() { // interpolate modifies newParams, only query params are left $location.search(newParams); } else { - throw $routeMinErr('norout', 'Tried updating route when with no current route'); + throw $routeMinErr('norout', 'Tried updating route with no current route'); } } };