Skip to content

Commit

Permalink
feat(expect): Expose toThrowMatchers
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Sep 27, 2022
1 parent fbc63fd commit eed2623
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,7 @@
- `[@jest/environment]` Allow `jest.mock` and `jest.doMock` to take a type argument ([#13254](https://github.com/facebook/jest/pull/13254))
- `[@jest/fake-timers]` Add `jest.now()` to return the current fake clock time ([#13244](https://github.com/facebook/jest/pull/13244), [13246](https://github.com/facebook/jest/pull/13246))
- `[@jest/mock]` Add `withImplementation` method for temporarily overriding a mock.
- `[expect]` Export `toThrow*` matchers ([#13328](https://github.com/facebook/jest/pull/13328))

### Fixes

Expand Down
3 changes: 2 additions & 1 deletion packages/expect/package.json
Expand Up @@ -15,7 +15,8 @@
"default": "./build/index.js"
},
"./package.json": "./package.json",
"./build/matchers": "./build/matchers.js"
"./build/matchers": "./build/matchers.js",
"./build/toThrowMatchers": "./build/toThrowMatchers.js"
},
"dependencies": {
"@jest/expect-utils": "workspace:^",
Expand Down
5 changes: 4 additions & 1 deletion scripts/buildUtils.mjs
Expand Up @@ -67,7 +67,10 @@ export function getPackages() {
),
...(pkg.name === 'jest-circus' ? {'./runner': './runner.js'} : {}),
...(pkg.name === 'expect'
? {'./build/matchers': './build/matchers.js'}
? {
'./build/matchers': './build/matchers.js',
'./build/toThrowMatchers': './build/toThrowMatchers.js',
}
: {}),
},
`Package "${pkg.name}" does not export correct files`,
Expand Down

0 comments on commit eed2623

Please sign in to comment.