SpyStrategy.d.ts 736 B

1234567891011121314151617181920212223
  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. *
  7. */
  8. export default class SpyStrategy {
  9. identity: () => string;
  10. exec: (...args: Array<any>) => unknown;
  11. callThrough: () => unknown;
  12. returnValue: (value: unknown) => unknown;
  13. returnValues: () => unknown;
  14. throwError: (something: string | Error) => unknown;
  15. callFake: (fn: Function) => unknown;
  16. stub: (fn: Function) => unknown;
  17. constructor({ name, fn, getSpy, }?: {
  18. name?: string;
  19. fn?: Function;
  20. getSpy?: () => unknown;
  21. });
  22. }
  23. //# sourceMappingURL=SpyStrategy.d.ts.map