diff --git a/CHANGELOG.md b/CHANGELOG.md index 88e203693010..3cf5560c5db9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features ### Fixes +- `[@jest/watcher]` Correct return type of `shouldRunTestSuite` for `JestHookEmitter` ([#9753](https://github.com/facebook/jest/pull/9753)) ### Chore & Maintenance diff --git a/packages/jest-watcher/src/types.ts b/packages/jest-watcher/src/types.ts index 4890c56b8f6e..cea9875965e7 100644 --- a/packages/jest-watcher/src/types.ts +++ b/packages/jest-watcher/src/types.ts @@ -36,7 +36,9 @@ export type JestHookSubscriber = { export type JestHookEmitter = { onFileChange: (fs: JestHookExposedFS) => void; onTestRunComplete: (results: AggregatedResult) => void; - shouldRunTestSuite: (testSuiteInfo: TestSuiteInfo) => Promise; + shouldRunTestSuite: ( + testSuiteInfo: TestSuiteInfo, + ) => Promise | boolean; }; export type UsageData = {