spyRegistry.d.ts 597 B

123456789101112131415161718
  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. import type { Spy } from '../types';
  9. export default class SpyRegistry {
  10. allowRespy: (allow: unknown) => void;
  11. spyOn: (obj: Record<string, Spy>, methodName: string, accessType?: keyof PropertyDescriptor) => Spy;
  12. clearSpies: () => void;
  13. respy: unknown;
  14. private _spyOnProperty;
  15. constructor({ currentSpies, }?: {
  16. currentSpies?: () => Array<Spy>;
  17. });
  18. }