Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

[@shopify/react-testing] Update the jest Matches to support the new @types/jest #1295

Merged
merged 1 commit into from
Feb 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 3 additions & 1 deletion packages/react-testing/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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] -->
## [Unreleased]

- Type error while using `[toHaveReactProps](https://github.com/Shopify/quilt/issues/1212) is now resolved by updating`@types/jest`to`24.9.1`. [#1212](https://github.com/Shopify/quilt/issues/1212)

## [1.8.0] - 2019-10-08

Expand Down
4 changes: 2 additions & 2 deletions packages/react-testing/src/matchers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ type PropsFromNode<T> = T extends Node<infer U> ? U : never;
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace jest {
interface Matchers<R> {
toHaveReactProps(props: Partial<PropsFromNode<R>>): void;
interface Matchers<R, T> {
toHaveReactProps(props: Partial<PropsFromNode<T>>): void;
toHaveReactDataProps(data: {[key: string]: string}): void;
toContainReactComponent<Type extends string | ComponentType<any>>(
type: Type,
Expand Down
17 changes: 6 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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==
Expand Down