Skip to content

Commit 5e51a06

Browse files
authored
feat(expect): Expose toThrowMatchers (#13328)
1 parent fbc63fd commit 5e51a06

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- `[@jest/environment]` Allow `jest.mock` and `jest.doMock` to take a type argument ([#13254](https://github.com/facebook/jest/pull/13254))
99
- `[@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))
1010
- `[@jest/mock]` Add `withImplementation` method for temporarily overriding a mock.
11+
- `[expect]` Export `toThrow*` matchers ([#13328](https://github.com/facebook/jest/pull/13328))
1112

1213
### Fixes
1314

packages/expect/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"default": "./build/index.js"
1616
},
1717
"./package.json": "./package.json",
18-
"./build/matchers": "./build/matchers.js"
18+
"./build/matchers": "./build/matchers.js",
19+
"./build/toThrowMatchers": "./build/toThrowMatchers.js"
1920
},
2021
"dependencies": {
2122
"@jest/expect-utils": "workspace:^",

scripts/buildUtils.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ export function getPackages() {
6767
),
6868
...(pkg.name === 'jest-circus' ? {'./runner': './runner.js'} : {}),
6969
...(pkg.name === 'expect'
70-
? {'./build/matchers': './build/matchers.js'}
70+
? {
71+
'./build/matchers': './build/matchers.js',
72+
'./build/toThrowMatchers': './build/toThrowMatchers.js',
73+
}
7174
: {}),
7275
},
7376
`Package "${pkg.name}" does not export correct files`,

0 commit comments

Comments
 (0)