Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

[several packages] Update jest matcher types #1239

Merged
merged 4 commits into from
Apr 17, 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
3 changes: 3 additions & 0 deletions packages/ast-utilities/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed

- `jest.Matchers` type updated to match `@types/jest` version `25` [[#1239](https://github.com/Shopify/quilt/pull/1239)]
- Update `jest-matcher-utils` to `25` [[#1375](https://github.com/Shopify/quilt/pull/1375)]

## [0.0.3] - 2019-09-18
Expand Down
2 changes: 1 addition & 1 deletion packages/ast-utilities/src/matchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace jest {
interface Matchers<R> {
interface Matchers<R, T = {}> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toBeFormated(expected: string): void;
}
}
Expand Down
1 change: 1 addition & 0 deletions packages/graphql-testing/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
### Changed

- Update `graphql` dependencies [[#1379](https://github.com/Shopify/quilt/pull/1379)]
- `jest.Matchers` type updated to match `@types/jest` version `25` [[#1239](https://github.com/Shopify/quilt/pull/1239)]
- Update `jest-matcher-utils` to `25` [[#1375](https://github.com/Shopify/quilt/pull/1375)]

## [4.0.9] - 2019-12-04
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-testing/src/matchers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {toHavePerformedGraphQLOperation} from './operations';
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace jest {
interface Matchers<R> {
interface Matchers<R, T = {}> {
toHavePerformedGraphQLOperation<Variables>(
document: GraphQLOperation<any, Variables, any>,
variables?: Partial<Variables>,
Expand Down
6 changes: 5 additions & 1 deletion packages/react-i18n/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ 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]

### Changed

- `jest.Matchers` type updated to match `@types/jest` version `25` [[#1239](https://github.com/Shopify/quilt/pull/1239)]

## [2.5.5] - 2020-04-13

Expand Down
2 changes: 1 addition & 1 deletion packages/react-i18n/src/test/matchers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace jest {
interface Matchers<R> {
interface Matchers<R, T = {}> {
toBeArrayOfUniqueItems(): void;
}
}
Expand Down
1 change: 1 addition & 0 deletions packages/react-testing/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

### Changed

- `jest.Matchers` type updated to match `@types/jest` version `25` [[#1239](https://github.com/Shopify/quilt/pull/1239)]
- Update `jest-matcher-utils` to `25` [[#1375](https://github.com/Shopify/quilt/pull/1375)]

## [2.0.0] - 2020-02-27
Expand Down
2 changes: 1 addition & 1 deletion packages/react-testing/src/matchers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ 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, T> {
interface Matchers<R, T = {}> {
toHaveReactProps(props: Partial<PropsFromNode<T>>): void;
toHaveReactDataProps(data: {[key: string]: string}): void;
toContainReactComponent<Type extends string | ComponentType<any>>(
Expand Down
2 changes: 1 addition & 1 deletion test/matchers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'jest-enzyme';
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace jest {
interface Matchers<R> {
interface Matchers<R, T = {}> {
toBeArrayOfUniqueItems(): void;
}
}
Expand Down