diff --git a/package.json b/package.json index 16c5880ec1..967c588b32 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "@types/enzyme": "^3.1.10", "@types/enzyme-adapter-react-16": "^1.0.3", "@types/faker": "^4.1.5", - "@types/jest": "^24.0.18", + "@types/jest": "^24.9.1", "@types/puppeteer": "^1.20.0", "@types/react": "16.9.19", "@types/react-dom": "^16.9.5", diff --git a/packages/ast-utilities/src/matchers.ts b/packages/ast-utilities/src/matchers.ts index bac2872521..5613aa34a0 100644 --- a/packages/ast-utilities/src/matchers.ts +++ b/packages/ast-utilities/src/matchers.ts @@ -7,7 +7,7 @@ import { declare global { // eslint-disable-next-line @typescript-eslint/no-namespace namespace jest { - interface Matchers { + interface Matchers { toBeFormated(expected: string): void; } } diff --git a/packages/graphql-testing/src/matchers/index.ts b/packages/graphql-testing/src/matchers/index.ts index c09feb9850..668d62681e 100644 --- a/packages/graphql-testing/src/matchers/index.ts +++ b/packages/graphql-testing/src/matchers/index.ts @@ -5,7 +5,7 @@ import {toHavePerformedGraphQLOperation} from './operations'; declare global { // eslint-disable-next-line @typescript-eslint/no-namespace namespace jest { - interface Matchers { + interface Matchers { toHavePerformedGraphQLOperation( document: GraphQLOperation, variables?: Partial, diff --git a/packages/react-i18n/src/test/matchers.ts b/packages/react-i18n/src/test/matchers.ts index fc15d97967..dd125b7b55 100644 --- a/packages/react-i18n/src/test/matchers.ts +++ b/packages/react-i18n/src/test/matchers.ts @@ -1,7 +1,7 @@ declare global { // eslint-disable-next-line @typescript-eslint/no-namespace namespace jest { - interface Matchers { + interface Matchers { toBeArrayOfUniqueItems(): void; } } diff --git a/packages/react-testing/CHANGELOG.md b/packages/react-testing/CHANGELOG.md index 61058f4667..e385e17b27 100644 --- a/packages/react-testing/CHANGELOG.md +++ b/packages/react-testing/CHANGELOG.md @@ -5,7 +5,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - +## [Unreleased] + +- Support `@types/jest^24.0.20` and higher. ## [1.8.0] - 2019-10-08 diff --git a/packages/react-testing/src/matchers/index.ts b/packages/react-testing/src/matchers/index.ts index 295d478b88..a87e2ad8bb 100644 --- a/packages/react-testing/src/matchers/index.ts +++ b/packages/react-testing/src/matchers/index.ts @@ -15,8 +15,8 @@ type PropsFromNode = T extends Node ? U : never; declare global { // eslint-disable-next-line @typescript-eslint/no-namespace namespace jest { - interface Matchers { - toHaveReactProps(props: Partial>): void; + interface Matchers { + toHaveReactProps(props: Partial>): void; toHaveReactDataProps(data: {[key: string]: string}): void; toContainReactComponent>( type: Type, diff --git a/test/matchers/index.ts b/test/matchers/index.ts index 34c2b769a4..cf2360e156 100644 --- a/test/matchers/index.ts +++ b/test/matchers/index.ts @@ -3,7 +3,7 @@ import 'jest-enzyme'; declare global { // eslint-disable-next-line @typescript-eslint/no-namespace namespace jest { - interface Matchers { + interface Matchers { toBeArrayOfUniqueItems(): void; } } diff --git a/yarn.lock b/yarn.lock index 3d1d388ada..e8a7dd5489 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1372,17 +1372,12 @@ "@types/istanbul-lib-coverage" "*" "@types/istanbul-lib-report" "*" -"@types/jest-diff@*": - version "20.0.1" - resolved "https://registry.yarnpkg.com/@types/jest-diff/-/jest-diff-20.0.1.tgz#35cc15b9c4f30a18ef21852e255fdb02f6d59b89" - integrity sha512-yALhelO3i0hqZwhjtcr6dYyaLoCHbAMshwtj6cGxTvHZAKXHsYGdff6E8EPw3xLKY0ELUTQ69Q1rQiJENnccMA== - -"@types/jest@^24.0.18": - version "24.0.19" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-24.0.19.tgz#f7036058d2a5844fe922609187c0ad8be430aff5" - integrity sha512-YYiqfSjocv7lk5H/T+v5MjATYjaTMsUkbDnjGqSMoO88jWdtJXJV4ST/7DKZcoMHMBvB2SeSfyOzZfkxXHR5xg== +"@types/jest@^24.9.1": + version "24.9.1" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-24.9.1.tgz#02baf9573c78f1b9974a5f36778b366aa77bd534" + integrity sha512-Fb38HkXSVA4L8fGKEZ6le5bB8r6MRWlOCZbVuWZcmOMSCd2wCYOwN1ibj8daIoV9naq7aaOZjrLCoCMptKU/4Q== dependencies: - "@types/jest-diff" "*" + jest-diff "^24.3.0" "@types/json-schema@^7.0.3": version "7.0.3" @@ -6403,7 +6398,7 @@ jest-config@^24.9.0: pretty-format "^24.9.0" realpath-native "^1.1.0" -jest-diff@^24.9.0: +jest-diff@^24.3.0, jest-diff@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-24.9.0.tgz#931b7d0d5778a1baf7452cb816e325e3724055da" integrity sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ==