You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: local types, supporting jest, @jest/globals, vitest (testing-library#511)
* feat!: local types, supporting jest, @jest/globals, vitest
Moves matcher types back into this package and adds support for
@jest/globals and vitest.
BREAKING CHANGE: Removes the extend-expect script. Users should use
the default import path or one of the new test platform-specific
paths to automatically extend the appropriate "expect" instance.
extend-expect was not documented in the Readme, so this change should
have minimal impact.
Users can now use the following import paths to automatically extend
"expect" for their chosen test platform:
- @testing-library/jest-dom - jest (@types/jest)
- @testing-library/jest-dom/jest-globals - @jest/globals
- @testing-library/jest-dom/vitest - vitest
For example:
import '@testing-library/jest-dom/jest-globals'
Importing from one of the above paths will augment the appropriate
matcher interface for the given test platform, assuming the import
is done in a .ts file that is included in the user's tsconfig.json.
It's also (still) possible to import the matchers directly without
side effects:
import * as matchers from '@testing-library/jest-dom/matchers'
* Update kcd-scripts
BREAKING CHANGE: Drop node < 14
0 commit comments