@@ -1416,12 +1416,14 @@ function createHttpBackendMock($rootScope, $timeout, $delegate, $browser) {
1416
1416
* order to change how a matched request is handled.
1417
1417
*
1418
1418
* - respond –
1419
- * `{function([status,] data[, headers, statusText])
1420
- * | function(function(method, url, data, headers, params)}`
1419
+ * ```js
1420
+ * {function([status,] data[, headers, statusText])
1421
+ * | function(function(method, url, data, headers, params)}
1422
+ * ```
1421
1423
* – The respond method takes a set of static data to be returned or a function that can
1422
- * return an array containing response status (number), response data (string), response
1423
- * headers (Object), and the text for the status (string). The respond method returns the
1424
- * `requestHandler` object for possible overrides.
1424
+ * return an array containing response status (number), response data (Array|Object| string),
1425
+ * response headers (Object), and the text for the status (string). The respond method returns
1426
+ * the `requestHandler` object for possible overrides.
1425
1427
*/
1426
1428
$httpBackend . when = function ( method , url , data , headers , keys ) {
1427
1429
var definition = new MockHttpExpectation ( method , url , data , headers , keys ) ,
@@ -1606,12 +1608,14 @@ function createHttpBackendMock($rootScope, $timeout, $delegate, $browser) {
1606
1608
* order to change how a matched request is handled.
1607
1609
*
1608
1610
* - respond –
1609
- * `{function([status,] data[, headers, statusText])
1610
- * | function(function(method, url, data, headers, params)}`
1611
+ * ```
1612
+ * { function([status,] data[, headers, statusText])
1613
+ * | function(function(method, url, data, headers, params)}
1614
+ * ```
1611
1615
* – The respond method takes a set of static data to be returned or a function that can
1612
- * return an array containing response status (number), response data (string), response
1613
- * headers (Object), and the text for the status (string). The respond method returns the
1614
- * `requestHandler` object for possible overrides.
1616
+ * return an array containing response status (number), response data (Array|Object| string),
1617
+ * response headers (Object), and the text for the status (string). The respond method returns
1618
+ * the `requestHandler` object for possible overrides.
1615
1619
*/
1616
1620
$httpBackend . expect = function ( method , url , data , headers , keys ) {
1617
1621
var expectation = new MockHttpExpectation ( method , url , data , headers , keys ) ,
@@ -2326,11 +2330,13 @@ angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
2326
2330
* `respond` or `passThrough` again in order to change how a matched request is handled.
2327
2331
*
2328
2332
* - respond –
2329
- * `{function([status,] data[, headers, statusText])
2330
- * | function(function(method, url, data, headers, params)}`
2333
+ * ```
2334
+ * { function([status,] data[, headers, statusText])
2335
+ * | function(function(method, url, data, headers, params)}
2336
+ * ```
2331
2337
* – The respond method takes a set of static data to be returned or a function that can return
2332
- * an array containing response status (number), response data (string), response headers
2333
- * (Object), and the text for the status (string).
2338
+ * an array containing response status (number), response data (Array|Object| string), response
2339
+ * headers (Object), and the text for the status (string).
2334
2340
* - passThrough – `{function()}` – Any request matching a backend definition with
2335
2341
* `passThrough` handler will be passed through to the real backend (an XHR request will be made
2336
2342
* to the server.)
0 commit comments