Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(expect): expose default matchers #11932

Merged
merged 3 commits into from
Oct 5, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

### Chore & Maintenance

- `[expect]` Export default matchers ([#11932](https://github.com/facebook/jest/pull/11932))

### Performance

## 27.2.4
Expand Down
3 changes: 2 additions & 1 deletion packages/expect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
mxschmitt marked this conversation as resolved.
Show resolved Hide resolved
},
"dependencies": {
"@jest/types": "^27.2.4",
Expand Down
5 changes: 4 additions & 1 deletion scripts/buildUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
);
Expand Down