From 84c658182857e615226953772d6152e03194de83 Mon Sep 17 00:00:00 2001 From: ronyhe Date: Mon, 2 Sep 2024 00:58:15 +0300 Subject: [PATCH 1/4] feat(expect): Expose spyMatchers --- packages/expect/package.json | 3 ++- scripts/buildUtils.mjs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/expect/package.json b/packages/expect/package.json index eb8484a5dce3..ed851e04ea16 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -18,7 +18,8 @@ }, "./package.json": "./package.json", "./build/matchers": "./build/matchers.js", - "./build/toThrowMatchers": "./build/toThrowMatchers.js" + "./build/toThrowMatchers": "./build/toThrowMatchers.js", + "./build/spyMatchers": "./build/spyMatchers.js" }, "dependencies": { "@jest/expect-utils": "workspace:*", diff --git a/scripts/buildUtils.mjs b/scripts/buildUtils.mjs index a92a16df950b..d7c49d281fce 100644 --- a/scripts/buildUtils.mjs +++ b/scripts/buildUtils.mjs @@ -92,6 +92,7 @@ function getPackages() { ? { './build/matchers': './build/matchers.js', './build/toThrowMatchers': './build/toThrowMatchers.js', + './build/spyMatchers': './build/spyMatchers.js', } : {}), }, From 222eae7a791e5548502abb0ddb41eeb4095f84c7 Mon Sep 17 00:00:00 2001 From: ronyhe Date: Mon, 2 Sep 2024 12:28:18 +0300 Subject: [PATCH 2/4] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 363abee8a97e..89c8bd9a9d52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ - `[@jest/util-snapshot]` Extract utils used by tooling from `jest-snapshot` into its own package ([#15095](https://github.com/facebook/jest/pull/15095)) - `[pretty-format]` [**BREAKING**] Do not render empty string children (`''`) in React plugin ([#14470](https://github.com/facebook/jest/pull/14470)) - `[jest-each]` Introduce `%$` option to add number of the test to its title ([#14710](https://github.com/jestjs/jest/pull/14710)) +- `[expect]` Export spy matchers ([#15288](https://github.com/jestjs/jest/pull/15288)) ### Fixes From b61cb1bb24c31dc82b40b9a7c858f9017ed5be57 Mon Sep 17 00:00:00 2001 From: ronyhe Date: Mon, 2 Sep 2024 12:44:04 +0300 Subject: [PATCH 3/4] Adhere to lint rule: re-order keys --- packages/expect/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/expect/package.json b/packages/expect/package.json index ed851e04ea16..4afbd122f9b1 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -18,8 +18,8 @@ }, "./package.json": "./package.json", "./build/matchers": "./build/matchers.js", - "./build/toThrowMatchers": "./build/toThrowMatchers.js", - "./build/spyMatchers": "./build/spyMatchers.js" + "./build/spyMatchers": "./build/spyMatchers.js", + "./build/toThrowMatchers": "./build/toThrowMatchers.js" }, "dependencies": { "@jest/expect-utils": "workspace:*", From ae9884e46b533d56b103c7eb5d85bcaefda720d2 Mon Sep 17 00:00:00 2001 From: ronyhe Date: Mon, 2 Sep 2024 12:52:11 +0300 Subject: [PATCH 4/4] Adhere to lint rule: re-order keys --- scripts/buildUtils.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/buildUtils.mjs b/scripts/buildUtils.mjs index d7c49d281fce..7e172dd3697f 100644 --- a/scripts/buildUtils.mjs +++ b/scripts/buildUtils.mjs @@ -91,8 +91,8 @@ function getPackages() { ...(pkg.name === 'expect' ? { './build/matchers': './build/matchers.js', - './build/toThrowMatchers': './build/toThrowMatchers.js', './build/spyMatchers': './build/spyMatchers.js', + './build/toThrowMatchers': './build/toThrowMatchers.js', } : {}), },