JestHooks.d.ts 652 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. import type { JestHookEmitter, JestHookSubscriber } from './types';
  8. declare type AvailableHooks = 'onFileChange' | 'onTestRunComplete' | 'shouldRunTestSuite';
  9. declare class JestHooks {
  10. private _listeners;
  11. private _subscriber;
  12. private _emitter;
  13. constructor();
  14. isUsed(hook: AvailableHooks): boolean;
  15. getSubscriber(): Readonly<JestHookSubscriber>;
  16. getEmitter(): Readonly<JestHookEmitter>;
  17. }
  18. export default JestHooks;