angular-cn/aio/dist/generated/docs/api/common/http/testing/HttpTestingController.json

5 lines
203 KiB
JSON

{
"id": "api/common/http/testing/HttpTestingController",
"title": "HttpTestingController",
"contents": "\n\n<article>\n <div class=\"breadcrumb-container\">\n <div class=\"breadcrumb\">\n <script type=\"application/ld+json\">\n {\n \"@context\": \"http://schema.org\",\n \"@type\": \"BreadcrumbList\",\n \"itemListElement\": [\n { \"@type\": \"ListItem\", \"position\": 1, \"item\": { \"@id\": \"https://angular.io//api\", \"name\": \"API\" } },\n { \"@type\": \"ListItem\", \"position\": 2, \"item\": { \"@id\": \"https://angular.io/api/common\", \"name\": \"@angular/common\" } },\n { \"@type\": \"ListItem\", \"position\": 3, \"item\": { \"@id\": \"https://angular.io/api/common/http/testing\", \"name\": \"@angular/common/http/testing\" } },\n { \"@type\": \"ListItem\", \"position\": 4, \"item\": { \"@id\": \"https://angular.io/api/common/http/testing/HttpTestingController\", \"name\": \"HttpTestingController\" } }\n ]\n }\n </script>\n <a href=\"/api\">API</a> > <a href=\"api/common\">@angular/common</a> > <a href=\"api/common/http/testing\">@angular/common/http/testing</a>\n </div>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/common/http/testing/src/api.ts?message=docs(common)%3A%20describe%20your%20change...#L22-L117\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/http/testing/src/api.ts#L22-L117\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n \n <header class=\"api-header\">\n <h1 id=\"httptestingcontroller\">HttpTestingController<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/http/testing/HttpTestingController#httptestingcontroller\"><i class=\"material-icons\">link</i></a></h1>\n \n <label class=\"api-type-label class\">class</label>\n \n \n \n </header>\n \n <aio-toc class=\"embedded\"></aio-toc>\n\n <div class=\"api-body\">\n \n <section class=\"short-description\">\n <p>Controller to be injected into tests, that allows for mocking and flushing\nof requests.</p>\n\n \n </section>\n \n \n \n <section class=\"class-overview\">\n<code-example language=\"ts\" hidecopy=\"true\">\nabstract class <a href=\"api/common/http/testing/HttpTestingController\" class=\"code-anchor\">HttpTestingController</a> {\n <a class=\"code-anchor\" href=\"api/common/http/testing/HttpTestingController#match\">abstract <span class=\"member-name\">match</span>(match: string | RequestMatch | ((req: HttpRequest&#x3C;any>) => boolean)): TestRequest[]</a>\n <a class=\"code-anchor\" href=\"api/common/http/testing/HttpTestingController#expectOne\">abstract <span class=\"member-name\">expectOne</span>(url: string, description?: string): TestRequest</a>\n <a class=\"code-anchor\" href=\"api/common/http/testing/HttpTestingController#expectNone\">abstract <span class=\"member-name\">expectNone</span>(url: string, description?: string): void</a>\n <a class=\"code-anchor\" href=\"api/common/http/testing/HttpTestingController#verify\">abstract <span class=\"member-name\">verify</span>(opts?: { ignoreCancelled?: boolean; }): void</a>\n}\n</code-example>\n\n \n \n\n</section>\n\n\n \n\n \n \n \n\n\n\n\n\n\n\n\n\n\n\n\n<section class=\"instance-methods\">\n <h2 id=\"methods\">Methods<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/http/testing/HttpTestingController#methods\"><i class=\"material-icons\">link</i></a></h2>\n \n <a id=\"match\"></a>\n<table class=\"is-full-width method-table instance-method\">\n <thead><tr><th>\n <div class=\"with-github-links\">\n <h3 id=\"match\">\n match()\n \n <a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/http/testing/HttpTestingController#match\"><i class=\"material-icons\">link</i></a></h3>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/common/http/testing/src/api.ts?message=docs(common)%3A%20describe%20your%20change...#L30-L33\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/http/testing/src/api.ts#L30-L33\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n </th></tr></thead>\n <tbody>\n <tr>\n <td class=\"short-description\">\n <p>Search for requests that match the given parameter, without any expectations.</p>\n\n </td>\n </tr>\n \n <tr>\n <td>\n <div class=\"overload-info\">\n \n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\">abstract <span class=\"member-name\">match</span>(match: string | RequestMatch | ((req: HttpRequest&#x3C;any>) => boolean)): TestRequest[]</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table instance-method-overload-parameters\">\n <tbody>\n \n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>match</code>\n </td>\n <td class=\"param-type\"><code>string | <a href=\"api/common/http/testing/RequestMatch\" class=\"code-anchor\">RequestMatch</a> | ((req: <a href=\"api/common/http/HttpRequest\" class=\"code-anchor\">HttpRequest</a><any>) => boolean)</any></code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns\">Returns</h6>\n <p><code><a href=\"api/common/http/testing/TestRequest\" class=\"code-anchor\">TestRequest</a>[]</code></p>\n\n \n\n\n \n\n \n</div>\n </td>\n </tr>\n \n\n \n\n \n </tbody>\n</table>\n\n \n <a id=\"expectOne\"></a>\n<table class=\"is-full-width method-table instance-method\">\n <thead><tr><th>\n <div class=\"with-github-links\">\n <h3 id=\"expectone\">\n expectOne()\n \n <a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/http/testing/HttpTestingController#expectone\"><i class=\"material-icons\">link</i></a></h3>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/common/http/testing/src/api.ts?message=docs(common)%3A%20describe%20your%20change...#L34-L42\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/http/testing/src/api.ts#L34-L42\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n </th></tr></thead>\n <tbody>\n <tr>\n <td class=\"short-description\">\n <p>Expect that a single request has been made which matches the given URL, and return its\nmock.</p>\n\n </td>\n </tr>\n <tr>\n <td>\n <details class=\"overloads\">\n <summary>\n <div class=\"icon-action-header\">\n <h4 class=\"no-anchor\" id=\"3-overloads\">3 overloads...</h4>\n <span class=\"actions\">\n <span class=\"show-all\">Show All</span>\n <span class=\"collapse-all\">Hide All</span>\n <i class=\"material-icons expand\">expand_more</i>\n </span>\n </div>\n </summary>\n <div class=\"detail-contents\">\n \n <div class=\"overload-info\">\n \n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\">abstract <span class=\"member-name\">expectOne</span>(url: string, description?: string): TestRequest</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-1\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table instance-method-overload-parameters\">\n <tbody>\n \n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>url</code>\n </td>\n <td class=\"param-type\"><code>string</code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>description</code>\n </td>\n <td class=\"param-type\"><code>string</code></td>\n <td class=\"param-description\">\n <p>Optional. Default is <code>undefined</code>.</p>\n \n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns-1\">Returns</h6>\n <p><code><a href=\"api/common/http/testing/TestRequest\" class=\"code-anchor\">TestRequest</a></code></p>\n\n \n\n\n \n\n \n</div>\n <hr class=\"hr-margin fullwidth\">\n \n \n <h5 class=\"no-anchor\" id=\"overload-1\">Overload #1</h5>\n <div class=\"overload-info\">\n \n <div class=\"short-description\">\n <p>Expect that a single request has been made which matches the given parameters, and return\nits mock.</p>\n\n </div>\n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\">abstract <span class=\"member-name\">expectOne</span>(params: RequestMatch, description?: string): TestRequest</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-2\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table instance-method-overload-parameters\">\n <tbody>\n \n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>params</code>\n </td>\n <td class=\"param-type\"><code><a href=\"api/common/http/testing/RequestMatch\" class=\"code-anchor\">RequestMatch</a></code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>description</code>\n </td>\n <td class=\"param-type\"><code>string</code></td>\n <td class=\"param-description\">\n <p>Optional. Default is <code>undefined</code>.</p>\n \n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns-2\">Returns</h6>\n <p><code><a href=\"api/common/http/testing/TestRequest\" class=\"code-anchor\">TestRequest</a></code></p>\n\n \n\n\n \n\n \n</div>\n <hr class=\"hr-margin\">\n \n <h5 class=\"no-anchor\" id=\"overload-2\">Overload #2</h5>\n <div class=\"overload-info\">\n \n <div class=\"short-description\">\n <p>Expect that a single request has been made which matches the given predicate function, and\nreturn its mock.</p>\n\n </div>\n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\">abstract <span class=\"member-name\">expectOne</span>(matchFn: (req: HttpRequest&#x3C;any>) => boolean, description?: string): TestRequest</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-3\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table instance-method-overload-parameters\">\n <tbody>\n \n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>matchFn</code>\n </td>\n <td class=\"param-type\"><code>(req: <a href=\"api/common/http/HttpRequest\" class=\"code-anchor\">HttpRequest</a><any>) => boolean</any></code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>description</code>\n </td>\n <td class=\"param-type\"><code>string</code></td>\n <td class=\"param-description\">\n <p>Optional. Default is <code>undefined</code>.</p>\n \n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns-3\">Returns</h6>\n <p><code><a href=\"api/common/http/testing/TestRequest\" class=\"code-anchor\">TestRequest</a></code></p>\n\n \n\n\n \n\n \n</div>\n <hr class=\"hr-margin\">\n \n <h5 class=\"no-anchor\" id=\"overload-3\">Overload #3</h5>\n <div class=\"overload-info\">\n \n <div class=\"short-description\">\n <p>Expect that a single request has been made which matches the given condition, and return\nits mock.</p>\n\n </div>\n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\">abstract <span class=\"member-name\">expectOne</span>(match: string | RequestMatch | ((req: HttpRequest&#x3C;any>) => boolean), description?: string): TestRequest</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-4\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table instance-method-overload-parameters\">\n <tbody>\n \n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>match</code>\n </td>\n <td class=\"param-type\"><code>string | <a href=\"api/common/http/testing/RequestMatch\" class=\"code-anchor\">RequestMatch</a> | ((req: <a href=\"api/common/http/HttpRequest\" class=\"code-anchor\">HttpRequest</a><any>) => boolean)</any></code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>description</code>\n </td>\n <td class=\"param-type\"><code>string</code></td>\n <td class=\"param-description\">\n <p>Optional. Default is <code>undefined</code>.</p>\n \n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns-4\">Returns</h6>\n <p><code><a href=\"api/common/http/testing/TestRequest\" class=\"code-anchor\">TestRequest</a></code></p>\n\n \n\n\n \n\n \n</div>\n \n \n </div>\n </details>\n </td>\n </tr>\n \n\n <tr>\n <td class=\"description\">\n <p>If no such request has been made, or more than one such request has been made, fail with an\nerror message including the given request description, if any.</p>\n\n </td>\n </tr>\n\n \n </tbody>\n</table>\n\n \n <a id=\"expectNone\"></a>\n<table class=\"is-full-width method-table instance-method\">\n <thead><tr><th>\n <div class=\"with-github-links\">\n <h3 id=\"expectnone\">\n expectNone()\n \n <a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/http/testing/HttpTestingController#expectnone\"><i class=\"material-icons\">link</i></a></h3>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/common/http/testing/src/api.ts?message=docs(common)%3A%20describe%20your%20change...#L73-L80\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/http/testing/src/api.ts#L73-L80\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n </th></tr></thead>\n <tbody>\n <tr>\n <td class=\"short-description\">\n <p>Expect that no requests have been made which match the given URL.</p>\n\n </td>\n </tr>\n <tr>\n <td>\n <details class=\"overloads\">\n <summary>\n <div class=\"icon-action-header\">\n <h4 class=\"no-anchor\" id=\"3-overloads-1\">3 overloads...</h4>\n <span class=\"actions\">\n <span class=\"show-all\">Show All</span>\n <span class=\"collapse-all\">Hide All</span>\n <i class=\"material-icons expand\">expand_more</i>\n </span>\n </div>\n </summary>\n <div class=\"detail-contents\">\n \n <div class=\"overload-info\">\n \n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\">abstract <span class=\"member-name\">expectNone</span>(url: string, description?: string): void</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-5\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table instance-method-overload-parameters\">\n <tbody>\n \n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>url</code>\n </td>\n <td class=\"param-type\"><code>string</code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>description</code>\n </td>\n <td class=\"param-type\"><code>string</code></td>\n <td class=\"param-description\">\n <p>Optional. Default is <code>undefined</code>.</p>\n \n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns-5\">Returns</h6>\n <p><code>void</code></p>\n\n \n\n\n \n\n \n</div>\n <hr class=\"hr-margin fullwidth\">\n \n \n <h5 class=\"no-anchor\" id=\"overload-1-1\">Overload #1</h5>\n <div class=\"overload-info\">\n \n <div class=\"short-description\">\n <p>Expect that no requests have been made which match the given parameters.</p>\n\n </div>\n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\">abstract <span class=\"member-name\">expectNone</span>(params: RequestMatch, description?: string): void</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-6\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table instance-method-overload-parameters\">\n <tbody>\n \n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>params</code>\n </td>\n <td class=\"param-type\"><code><a href=\"api/common/http/testing/RequestMatch\" class=\"code-anchor\">RequestMatch</a></code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>description</code>\n </td>\n <td class=\"param-type\"><code>string</code></td>\n <td class=\"param-description\">\n <p>Optional. Default is <code>undefined</code>.</p>\n \n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns-6\">Returns</h6>\n <p><code>void</code></p>\n\n \n\n\n \n\n \n</div>\n <hr class=\"hr-margin\">\n \n <h5 class=\"no-anchor\" id=\"overload-2-1\">Overload #2</h5>\n <div class=\"overload-info\">\n \n <div class=\"short-description\">\n <p>Expect that no requests have been made which match the given predicate function.</p>\n\n </div>\n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\">abstract <span class=\"member-name\">expectNone</span>(matchFn: (req: HttpRequest&#x3C;any>) => boolean, description?: string): void</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-7\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table instance-method-overload-parameters\">\n <tbody>\n \n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>matchFn</code>\n </td>\n <td class=\"param-type\"><code>(req: <a href=\"api/common/http/HttpRequest\" class=\"code-anchor\">HttpRequest</a><any>) => boolean</any></code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>description</code>\n </td>\n <td class=\"param-type\"><code>string</code></td>\n <td class=\"param-description\">\n <p>Optional. Default is <code>undefined</code>.</p>\n \n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns-7\">Returns</h6>\n <p><code>void</code></p>\n\n \n\n\n \n\n \n</div>\n <hr class=\"hr-margin\">\n \n <h5 class=\"no-anchor\" id=\"overload-3-1\">Overload #3</h5>\n <div class=\"overload-info\">\n \n <div class=\"short-description\">\n <p>Expect that no requests have been made which match the given condition.</p>\n\n </div>\n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\">abstract <span class=\"member-name\">expectNone</span>(match: string | RequestMatch | ((req: HttpRequest&#x3C;any>) => boolean), description?: string): void</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-8\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table instance-method-overload-parameters\">\n <tbody>\n \n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>match</code>\n </td>\n <td class=\"param-type\"><code>string | <a href=\"api/common/http/testing/RequestMatch\" class=\"code-anchor\">RequestMatch</a> | ((req: <a href=\"api/common/http/HttpRequest\" class=\"code-anchor\">HttpRequest</a><any>) => boolean)</any></code></td>\n <td class=\"param-description\">\n \n \n </td>\n </tr>\n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>description</code>\n </td>\n <td class=\"param-type\"><code>string</code></td>\n <td class=\"param-description\">\n <p>Optional. Default is <code>undefined</code>.</p>\n \n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns-8\">Returns</h6>\n <p><code>void</code></p>\n\n \n\n\n \n\n \n</div>\n \n \n </div>\n </details>\n </td>\n </tr>\n \n\n <tr>\n <td class=\"description\">\n <p>If a matching request has been made, fail with an error message including the given request\ndescription, if any.</p>\n\n </td>\n </tr>\n\n \n </tbody>\n</table>\n\n \n <a id=\"verify\"></a>\n<table class=\"is-full-width method-table instance-method\">\n <thead><tr><th>\n <div class=\"with-github-links\">\n <h3 id=\"verify\">\n verify()\n \n <a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/common/http/testing/HttpTestingController#verify\"><i class=\"material-icons\">link</i></a></h3>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/common/http/testing/src/api.ts?message=docs(common)%3A%20describe%20your%20change...#L106-L116\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/http/testing/src/api.ts#L106-L116\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n </th></tr></thead>\n <tbody>\n <tr>\n <td class=\"short-description\">\n <p>Verify that no unmatched requests are outstanding.</p>\n\n </td>\n </tr>\n \n <tr>\n <td>\n <div class=\"overload-info\">\n \n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\">abstract <span class=\"member-name\">verify</span>(opts?: { ignoreCancelled?: boolean; }): void</code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters-9\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table instance-method-overload-parameters\">\n <tbody>\n \n <tr class=\"instance-method-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>opts</code>\n </td>\n <td class=\"param-type\"><code>object</code></td>\n <td class=\"param-description\">\n <p>Optional. Default is <code>undefined</code>.</p>\n \n </td>\n </tr>\n </tbody>\n</table>\n\n \n <h6 class=\"no-anchor\" id=\"returns-9\">Returns</h6>\n <p><code>void</code></p>\n\n \n\n\n \n\n \n</div>\n </td>\n </tr>\n \n\n <tr>\n <td class=\"description\">\n <p>If any requests are outstanding, fail with an error message indicating which requests were not\nhandled.</p>\n<p>If <code>ignoreCancelled</code> is not set (the default), <code>verify()</code> will also fail if cancelled requests\nwere not explicitly matched.</p>\n\n </td>\n </tr>\n\n \n </tbody>\n</table>\n\n \n</section>\n\n\n\n \n\n\n </div>\n</article>\n\n<!-- links to this doc:\n - api/common/http/testing\n - api/common/http/testing/HttpClientTestingModule\n - guide/http\n - guide/upgrade\n-->\n<!-- links from this doc:\n - /api\n - api/common\n - api/common/http/HttpRequest\n - api/common/http/testing\n - api/common/http/testing/HttpTestingController#expectNone\n - api/common/http/testing/HttpTestingController#expectOne\n - api/common/http/testing/HttpTestingController#expectnone\n - api/common/http/testing/HttpTestingController#expectone\n - api/common/http/testing/HttpTestingController#httptestingcontroller\n - api/common/http/testing/HttpTestingController#match\n - api/common/http/testing/HttpTestingController#methods\n - api/common/http/testing/HttpTestingController#verify\n - api/common/http/testing/RequestMatch\n - api/common/http/testing/TestRequest\n - https://github.com/angular/angular/edit/master/packages/common/http/testing/src/api.ts?message=docs(common)%3A%20describe%20your%20change...#L106-L116\n - https://github.com/angular/angular/edit/master/packages/common/http/testing/src/api.ts?message=docs(common)%3A%20describe%20your%20change...#L22-L117\n - https://github.com/angular/angular/edit/master/packages/common/http/testing/src/api.ts?message=docs(common)%3A%20describe%20your%20change...#L30-L33\n - https://github.com/angular/angular/edit/master/packages/common/http/testing/src/api.ts?message=docs(common)%3A%20describe%20your%20change...#L34-L42\n - https://github.com/angular/angular/edit/master/packages/common/http/testing/src/api.ts?message=docs(common)%3A%20describe%20your%20change...#L73-L80\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/http/testing/src/api.ts#L106-L116\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/http/testing/src/api.ts#L22-L117\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/http/testing/src/api.ts#L30-L33\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/http/testing/src/api.ts#L34-L42\n - https://github.com/angular/angular/tree/12.0.0-next.7/packages/common/http/testing/src/api.ts#L73-L80\n-->"
}