Skip to content

Commit

Permalink
chore(expect): expose default matchers (#11932)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt authored Oct 5, 2021
1 parent e420155 commit 24f9bc8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,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"
},
"dependencies": {
"@jest/types": "^27.2.4",
Expand Down
7 changes: 6 additions & 1 deletion scripts/buildUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ module.exports.getPackages = function getPackages() {
{},
),
...(pkg.name === 'jest-circus' ? {'./runner': './runner.js'} : {}),
...(pkg.name === 'expect' ? {'./build/utils': './build/utils.js'} : {}),
...(pkg.name === 'expect'
? {
'./build/matchers': './build/matchers.js',
'./build/utils': './build/utils.js',
}
: {}),
},
`Package ${pkg.name} does not export correct files`,
);
Expand Down

0 comments on commit 24f9bc8

Please sign in to comment.