{"version":3,"file":"apollo-angular-testing.mjs","sources":["../../testing/src/controller.ts","../../testing/src/operation.ts","../../testing/src/backend.ts","../../testing/src/module.ts","../../testing/src/apollo-angular-testing.ts"],"sourcesContent":["import { DocumentNode } from 'graphql';\nimport { Operation, TestOperation } from './operation';\n\nexport type MatchOperationFn = (op: Operation) => boolean;\nexport type MatchOperation = string | DocumentNode | Operation | MatchOperationFn;\n\n/**\n * Controller to be injected into tests, that allows for mocking and flushing\n * of operations.\n *\n *\n */\nexport abstract class ApolloTestingController {\n  /**\n   * Search for operations that match the given parameter, without any expectations.\n   */\n  public abstract match(match: MatchOperation): TestOperation[];\n\n  /**\n   * Expect that a single operation has been made which matches the given URL, and return its\n   * mock.\n   *\n   * If no such operation has been made, or more than one such operation has been made, fail with an\n   * error message including the given operation description, if any.\n   */\n  public abstract expectOne(operationName: string, description?: string): TestOperation;\n\n  /**\n   * Expect that a single operation has been made which matches the given parameters, and return\n   * its mock.\n   *\n   * If no such operation has been made, or more than one such operation has been made, fail with an\n   * error message including the given operation description, if any.\n   */\n  public abstract expectOne(op: Operation, description?: string): TestOperation;\n\n  /**\n   * Expect that a single operation has been made which matches the given predicate function, and\n   * return its mock.\n   *\n   * If no such operation has been made, or more than one such operation has been made, fail with an\n   * error message including the given operation description, if any.\n   */\n  public abstract expectOne(matchFn: MatchOperationFn, description?: string): TestOperation;\n\n  /**\n   * Expect that a single operation has been made which matches the given condition, and return\n   * its mock.\n   *\n   * If no such operation has been made, or more than one such operation has been made, fail with an\n   * error message including the given operation description, if any.\n   */\n  public abstract expectOne(match: MatchOperation, description?: string): TestOperation;\n\n  /**\n   * Expect that no operations have been made which match the given URL.\n   *\n   * If a matching operation has been made, fail with an error message including the given\n   * description, if any.\n   */\n  public abstract expectNone(operationName: string, description?: string): void;\n\n  /**\n   * Expect that no operations have been made which match the given parameters.\n   *\n   * If a matching operation has been made, fail with an error message including the given\n   * description, if any.\n   */\n  public abstract expectNone(op: Operation, description?: string): void;\n\n  /**\n   * Expect that no operations have been made which match the given predicate function.\n   *\n   * If a matching operation has been made, fail with an error message including the given\n   * description, if any.\n   */\n  public abstract expectNone(matchFn: MatchOperationFn, description?: string): void;\n\n  /**\n   * Expect that no operations have been made which match the given condition.\n   *\n   * If a matching operation has been made, fail with an error message including the given\n   * description, if any.\n   */\n  public abstract expectNone(match: MatchOperation, description?: string): void;\n\n  /**\n   * Verify that no unmatched operations are outstanding.\n   *\n   * If any operations are outstanding, fail with an error message indicating which operations were not\n   * handled.\n   */\n  public abstract verify(): void;\n}\n","import { GraphQLFormattedError, OperationTypeNode } from 'graphql';\nimport { Observer } from 'rxjs';\nimport { ApolloLink, ErrorLike } from '@apollo/client';\nimport { isErrorLike } from '@apollo/client/errors';\n\nexport type Operation = ApolloLink.Operation & {\n  clientName: string;\n};\n\nexport class TestOperation<T = { [key: string]: any }> {\n  constructor(\n    public readonly operation: Operation,\n    private readonly observer: Observer<ApolloLink.Result<T>>,\n  ) {}\n\n  public flush(result: ApolloLink.Result<T> | ErrorLike): void {\n    if (isErrorLike(result)) {\n      this.observer.error(result);\n    } else {\n      const fetchResult = result ? { ...result } : result;\n      this.observer.next(fetchResult);\n\n      if (this.operation.operationType !== OperationTypeNode.SUBSCRIPTION) {\n        this.complete();\n      }\n    }\n  }\n\n  public complete() {\n    this.observer.complete();\n  }\n\n  public flushData(data: T | null): void {\n    this.flush({ data });\n  }\n\n  public networkError(error: ErrorLike): void {\n    this.flush(error);\n  }\n\n  public graphqlErrors(errors: GraphQLFormattedError[]): void {\n    this.flush({\n      errors,\n    });\n  }\n}\n","import { DocumentNode, print } from 'graphql';\nimport { Observable, Observer } from 'rxjs';\nimport { Injectable } from '@angular/core';\nimport { ApolloLink } from '@apollo/client';\nimport { addTypenameToDocument } from '@apollo/client/utilities';\nimport { ApolloTestingController, MatchOperation } from './controller';\nimport { Operation, TestOperation } from './operation';\n\n/**\n * A testing backend for `Apollo`.\n *\n * `ApolloTestingBackend` works by keeping a list of all open operations.\n * As operations come in, they're added to the list. Users can assert that specific\n * operations were made and then flush them. In the end, a `verify()` method asserts\n * that no unexpected operations were made.\n */\n@Injectable()\nexport class ApolloTestingBackend implements ApolloTestingController {\n  /**\n   * List of pending operations which have not yet been expected.\n   */\n  private open: TestOperation[] = [];\n\n  /**\n   * Handle an incoming operation by queueing it in the list of open operations.\n   */\n  public handle(op: Operation): Observable<ApolloLink.Result> {\n    return new Observable((observer: Observer<any>) => {\n      const testOp = new TestOperation(op, observer);\n      this.open.push(testOp);\n    });\n  }\n\n  /**\n   * Helper function to search for operations in the list of open operations.\n   */\n  private _match(match: MatchOperation): TestOperation[] {\n    if (typeof match === 'string') {\n      return this.open.filter(testOp => testOp.operation.operationName === match);\n    } else if (typeof match === 'function') {\n      return this.open.filter(testOp => match(testOp.operation));\n    } else {\n      if (this.isDocumentNode(match)) {\n        return this.open.filter(\n          testOp => print(testOp.operation.query) === print(addTypenameToDocument(match)),\n        );\n      }\n\n      return this.open.filter(testOp => this.matchOp(match, testOp));\n    }\n  }\n\n  private matchOp(match: Operation, testOp: TestOperation): boolean {\n    const variables = JSON.stringify(match.variables);\n    const extensions = JSON.stringify(match.extensions);\n\n    const sameName = this.compare(match.operationName, testOp.operation.operationName);\n    const sameVariables = this.compare(variables, testOp.operation.variables);\n\n    const sameQuery = print(testOp.operation.query) === print(addTypenameToDocument(match.query));\n\n    const sameExtensions = this.compare(extensions, testOp.operation.extensions);\n\n    return sameName && sameVariables && sameQuery && sameExtensions;\n  }\n\n  private compare(expected?: string, value?: Object | string): boolean {\n    const received = typeof value === 'string' ? value : JSON.stringify(value);\n\n    return !expected || received === expected;\n  }\n\n  /**\n   * Search for operations in the list of open operations, and return all that match\n   * without asserting anything about the number of matches.\n   */\n  public match(match: MatchOperation): TestOperation[] {\n    const results = this._match(match);\n\n    results.forEach(result => {\n      const index = this.open.indexOf(result);\n      if (index !== -1) {\n        this.open.splice(index, 1);\n      }\n    });\n    return results;\n  }\n\n  /**\n   * Expect that a single outstanding request matches the given matcher, and return\n   * it.\n   *\n   * operations returned through this API will no longer be in the list of open operations,\n   * and thus will not match twice.\n   */\n  public expectOne(match: MatchOperation, description?: string): TestOperation {\n    description = description || this.descriptionFromMatcher(match);\n    const matches = this.match(match);\n    if (matches.length > 1) {\n      throw new Error(\n        `Expected one matching operation for criteria \"${description}\", found ${matches.length} operations.`,\n      );\n    }\n    if (matches.length === 0) {\n      throw new Error(`Expected one matching operation for criteria \"${description}\", found none.`);\n    }\n    return matches[0];\n  }\n\n  /**\n   * Expect that no outstanding operations match the given matcher, and throw an error\n   * if any do.\n   */\n  public expectNone(match: MatchOperation, description?: string): void {\n    description = description || this.descriptionFromMatcher(match);\n    const matches = this.match(match);\n    if (matches.length > 0) {\n      throw new Error(\n        `Expected zero matching operations for criteria \"${description}\", found ${matches.length}.`,\n      );\n    }\n  }\n\n  /**\n   * Validate that there are no outstanding operations.\n   */\n  public verify(): void {\n    const open = this.open;\n\n    if (open.length > 0) {\n      // Show the methods and URLs of open operations in the error, for convenience.\n      const operations = open.map(testOp => testOp.operation.operationName).join(', ');\n      throw new Error(`Expected no open operations, found ${open.length}: ${operations}`);\n    }\n  }\n\n  private isDocumentNode(docOrOp: DocumentNode | Operation): docOrOp is DocumentNode {\n    return !(docOrOp as Operation).operationName;\n  }\n\n  private descriptionFromMatcher(matcher: MatchOperation): string {\n    if (typeof matcher === 'string') {\n      return `Match operationName: ${matcher}`;\n    } else if (typeof matcher === 'object') {\n      if (this.isDocumentNode(matcher)) {\n        return `Match DocumentNode`;\n      }\n\n      const name = matcher.operationName || '(any)';\n      const variables = JSON.stringify(matcher.variables) || '(any)';\n\n      return `Match operation: ${name}, variables: ${variables}`;\n    } else {\n      return `Match by function: ${matcher.name}`;\n    }\n  }\n}\n","import { Apollo } from 'apollo-angular';\nimport { Inject, InjectionToken, NgModule, Optional } from '@angular/core';\nimport { ApolloCache, ApolloLink, InMemoryCache } from '@apollo/client';\nimport { ApolloTestingBackend } from './backend';\nimport { ApolloTestingController } from './controller';\nimport { Operation } from './operation';\n\nexport type NamedCaches = Record<string, ApolloCache | undefined | null>;\n\nexport const APOLLO_TESTING_CACHE = new InjectionToken<ApolloCache>('apollo-angular/testing cache');\n\nexport const APOLLO_TESTING_NAMED_CACHE = new InjectionToken<NamedCaches>(\n  'apollo-angular/testing named cache',\n);\n\nexport const APOLLO_TESTING_CLIENTS = new InjectionToken<string[]>(\n  'apollo-angular/testing named clients',\n);\n\nfunction addClient(name: string, op: ApolloLink.Operation): Operation {\n  (op as Operation).clientName = name;\n\n  return op as Operation;\n}\n\n@NgModule({\n  providers: [\n    Apollo,\n    ApolloTestingBackend,\n    { provide: ApolloTestingController, useExisting: ApolloTestingBackend },\n  ],\n})\nexport class ApolloTestingModuleCore {\n  constructor(\n    apollo: Apollo,\n    backend: ApolloTestingBackend,\n    @Optional()\n    @Inject(APOLLO_TESTING_CLIENTS)\n    namedClients?: string[],\n    @Optional()\n    @Inject(APOLLO_TESTING_CACHE)\n    cache?: ApolloCache,\n    @Optional()\n    @Inject(APOLLO_TESTING_NAMED_CACHE)\n    namedCaches?: NamedCaches,\n  ) {\n    function createOptions(name: string, c?: ApolloCache | null) {\n      return {\n        connectToDevTools: false,\n        link: new ApolloLink(operation => backend.handle(addClient(name, operation))),\n        cache: c || new InMemoryCache(),\n      };\n    }\n\n    apollo.create(createOptions('default', cache));\n\n    if (namedClients && namedClients.length) {\n      namedClients.forEach(name => {\n        const caches = namedCaches && typeof namedCaches === 'object' ? namedCaches : {};\n\n        apollo.createNamed(name, createOptions(name, caches[name]));\n      });\n    }\n  }\n}\n\n@NgModule({\n  imports: [ApolloTestingModuleCore],\n})\nexport class ApolloTestingModule {\n  static withClients(names: string[]) {\n    return {\n      ngModule: ApolloTestingModuleCore,\n      providers: [\n        {\n          provide: APOLLO_TESTING_CLIENTS,\n          useValue: names,\n        },\n      ],\n    };\n  }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2.ApolloTestingBackend"],"mappings":";;;;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