diff --git a/CHANGELOG.md b/CHANGELOG.md index 56daf793e58e..e10f7a8b28dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ ### Chore & Maintenance +- `[expect]` Expose default matchers ([#11932](https://github.com/facebook/jest/pull/11932)) + ### Performance ## 27.2.4 diff --git a/packages/expect/package.json b/packages/expect/package.json index f2b21358fa6f..c8da2ec46ea0 100644 --- a/packages/expect/package.json +++ b/packages/expect/package.json @@ -12,7 +12,8 @@ "exports": { ".": "./build/index.js", "./package.json": "./package.json", - "./build/utils": "./build/utils.js" + "./build/utils": "./build/utils.js", + "./build/matchers": "./build/matchers.js" }, "dependencies": { "@jest/types": "^27.2.4", diff --git a/scripts/buildUtils.js b/scripts/buildUtils.js index a8de3889814e..1f822a9bf3ab 100644 --- a/scripts/buildUtils.js +++ b/scripts/buildUtils.js @@ -52,7 +52,10 @@ module.exports.getPackages = function getPackages() { {}, ), ...(pkg.name === 'jest-circus' ? {'./runner': './runner.js'} : {}), - ...(pkg.name === 'expect' ? {'./build/utils': './build/utils.js'} : {}), + ...(pkg.name === 'expect' ? { + './build/utils': './build/utils.js', + './build/matchers': './build/matchers.js', + } : {}), }, `Package ${pkg.name} does not export correct files`, );