From 26951bdda3075d178bd6bbd02aca51b455e0eed6 Mon Sep 17 00:00:00 2001 From: Ahn Date: Thu, 2 Apr 2020 16:59:37 +0200 Subject: [PATCH] =?UTF-8?q?chore(jest-types):=20correct=20return=20type=20?= =?UTF-8?q?of=20shouldRunTestSuite=20fo=E2=80=A6=20(#9753)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + packages/jest-watcher/src/types.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) 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 = {