Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit e922c38

Browse files
committed
docs(ngMockE2E): correctly document the data arg of $httpBackend.when(...)
1 parent 1b7ddd3 commit e922c38

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/ngMock/angular-mocks.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -2527,7 +2527,8 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
25272527
* @param {string} method HTTP method.
25282528
* @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
25292529
* and returns true if the url matches the current definition.
2530-
* @param {(string|RegExp)=} data HTTP request body.
2530+
* @param {(string|RegExp|function(string))=} data HTTP request body or function that receives
2531+
* data string and returns true if the data is as expected.
25312532
* @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
25322533
* object and returns true if the headers match the current definition.
25332534
* @param {(Array)=} keys Array of keys to assign to regex matches in request url described on
@@ -2610,7 +2611,8 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
26102611
*
26112612
* @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
26122613
* and returns true if the url matches the current definition.
2613-
* @param {(string|RegExp)=} data HTTP request body.
2614+
* @param {(string|RegExp|function(string))=} data HTTP request body or function that receives
2615+
* data string and returns true if the data is as expected.
26142616
* @param {(Object|function(Object))=} headers HTTP headers.
26152617
* @param {(Array)=} keys Array of keys to assign to regex matches in request url described on
26162618
* {@link ngMock.$httpBackend $httpBackend mock}.
@@ -2628,7 +2630,8 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
26282630
*
26292631
* @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
26302632
* and returns true if the url matches the current definition.
2631-
* @param {(string|RegExp)=} data HTTP request body.
2633+
* @param {(string|RegExp|function(string))=} data HTTP request body or function that receives
2634+
* data string and returns true if the data is as expected.
26322635
* @param {(Object|function(Object))=} headers HTTP headers.
26332636
* @param {(Array)=} keys Array of keys to assign to regex matches in request url described on
26342637
* {@link ngMock.$httpBackend $httpBackend mock}.
@@ -2646,7 +2649,8 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
26462649
*
26472650
* @param {string|RegExp|function(string)=} url HTTP url or function that receives a url
26482651
* and returns true if the url matches the current definition.
2649-
* @param {(string|RegExp)=} data HTTP request body.
2652+
* @param {(string|RegExp|function(string))=} data HTTP request body or function that receives
2653+
* data string and returns true if the data is as expected.
26502654
* @param {(Object|function(Object))=} headers HTTP headers.
26512655
* @param {(Array)=} keys Array of keys to assign to regex matches in request url described on
26522656
* {@link ngMock.$httpBackend $httpBackend mock}.

0 commit comments

Comments
 (0)