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

5 lines
203 KiB
JSON
Raw Permalink Normal View History

{
"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-ic
}