Skip to content

v6.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 13 Aug 16:32
· 51 commits to main since this release
4b764b9

6.0.0 (2023-08-13)

Features

  • local types, supporting jest, @jest/globals, vitest (#511) (4b764b9)

BREAKING CHANGES

  • 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
  • Drop node < 14