From 36c4f7ed1b83bebc383ad9f0201d678631902983 Mon Sep 17 00:00:00 2001 From: Tom Mrazauskas Date: Tue, 20 Sep 2022 10:25:57 +0300 Subject: [PATCH] feat(@jest/test-utils): use native types --- packages/test-utils/src/ConditionalTest.ts | 6 ++++-- packages/test-utils/tsconfig.json | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/test-utils/src/ConditionalTest.ts b/packages/test-utils/src/ConditionalTest.ts index 53e1f965e969..badcb0c10ada 100644 --- a/packages/test-utils/src/ConditionalTest.ts +++ b/packages/test-utils/src/ConditionalTest.ts @@ -5,9 +5,11 @@ * LICENSE file in the root directory of this source tree. */ -/* eslint-disable jest/no-focused-tests */ - import semver = require('semver'); +import type {Global} from '@jest/types'; + +declare const describe: Global.TestFrameworkGlobals['describe']; +declare const test: Global.TestFrameworkGlobals['test']; export function isJestJasmineRun(): boolean { return process.env.JEST_JASMINE === '1'; diff --git a/packages/test-utils/tsconfig.json b/packages/test-utils/tsconfig.json index 110097eb7fef..081c80a123be 100644 --- a/packages/test-utils/tsconfig.json +++ b/packages/test-utils/tsconfig.json @@ -2,7 +2,9 @@ "extends": "../../tsconfig.json", "compilerOptions": { "rootDir": "src", - "outDir": "build" + "outDir": "build", + // we don't want `@types/jest` to be referenced + "types": ["node"] }, "include": ["./src/**/*"], "references": [{"path": "../jest-types"}, {"path": "../pretty-format"}]