NET-Web-API-w-Angular/my-app/node_modules/@angular/common/fesm2022/http/testing.mjs.map

1 line
28 KiB
Text
Raw Normal View History

2024-02-09 00:38:41 +00:00
{"version":3,"file":"testing.mjs","sources":["../../../../../../../packages/common/http/testing/src/api.ts","../../../../../../../packages/common/http/testing/src/request.ts","../../../../../../../packages/common/http/testing/src/backend.ts","../../../../../../../packages/common/http/testing/src/provider.ts","../../../../../../../packages/common/http/testing/src/module.ts","../../../../../../../packages/common/http/testing/testing.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {HttpRequest} from '@angular/common/http';\n\nimport {TestRequest} from './request';\n\n/**\n * Defines a matcher for requests based on URL, method, or both.\n *\n * @publicApi\n */\nexport interface RequestMatch {\n method?: string;\n url?: string;\n}\n\n/**\n * Controller to be injected into tests, that allows for mocking and flushing\n * of requests.\n *\n * @publicApi\n */\nexport abstract class HttpTestingController {\n /**\n * Search for requests that match the given parameter, without any expectations.\n */\n abstract match(\n match: string | RequestMatch | ((req: HttpRequest<any>) => boolean),\n ): TestRequest[];\n\n /**\n * Expect that a single request has been made which matches the given URL, and return its\n * mock.\n *\n * If no such request has been made, or more than one such request has been made, fail with an\n * error message including the given request description, if any.\n */\n abstract expectOne(url: string, description?: string): TestRequest;\n\n /**\n * Expect that a single request has been made which matches the given parameters, and return\n * its mock.\n *\n * If no such request has been made, or more than one such request has been made, fail with an\n * error message including the given request description, if any.\n */\n abstract expectOne(params: RequestMatch, description?: string): TestRequest;\n\n /**\n * Expect that a single request has been made which matches the given predicate function, and\n * return its mock.\n *\n * If no such request has been made, or more than one such request has been made, fail with an\n * error message including the given request description, if any.\n */\n abstract expectOne(\n matchFn: (req: HttpRequest<any>) => boolean,\n description?: string,\n ): TestRequest;\n\n /**\n * Expect that a single request has been made which matches the given condition, and return\n * its mock.\n *\n * If no such request has been made, or more than one such request has been made, fail with an\n * error message including the given request description, if any.\n */\n abstract expectOne(\n match: string | RequestMatch | ((req: HttpRequest<any>) => boolean),\n description?: string,\n ): TestRequest;\n\n /**\n * Expect that no requests have been made which match the given URL.\n *\n * If a matching request has been made, fail with an error message including the given request\n * description, if any.\n */\n abstract expectNone(url: string, description?: string): void;\n\n /**\n * Expect that no requests have been made which match the given parameters.\n *\n * If a matching request has been made, fail with an error message including the given request\n * description, if any.\n */\n abstract expectNone(params: RequestMatch, description?: string): void;\n\n /**\n * Expect that no requests have been made which match the given predicate function.\n *\n * If a matching request has been made, fail with an error message including the given request\n * description, if any.\n */\n abstract expectNone(matchFn: (req: HttpRequest<any>) => boolean, description?: string): void;\n\n /**\n * Expect that no requests have been made which match the given condition.\n *\n * If a matching request has been made, fail with an error message including the given request\n * description, if any.\n */\n abstract expectNo