Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Standalone types for "./matchers" export and add Bun support #566

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

jakeboone02
Copy link
Contributor

@jakeboone02 jakeboone02 commented Jan 4, 2024

What:

Fixes #554, type definitions for "./matchers" export.

Also adds support for Bun types when using bun:test.

Why:

This results in a TypeScript error:

import * as matchers from "@testing-library/jest-dom/matchers"
export.extend(matchers) // <-- matchers is not the correct type

Also...Bun is great.

How:

Referenced a new matchers-standalone.d.ts file in package.json#export#"./matchers" (not exported in the main export) that contains a version of matchers.d.ts converted to the correct types.

Checklist:

  • Documentation
  • Tests
  • Updated Type Definitions
  • Ready to be merged

I don't think new documentation is necessary, but I'm not sure this is ready to be merged because I had to disable the husky config in order to commit. The part of the pre-commit script that failed was kcd-scripts test --findRelatedTests, I think because it saw a new file that didn't contain tests. But the new file doesn't really require JavaScript tests since it's a .d.ts file. Also the new Bun files have tests, so I'm not really sure what the husky config's problem is.

Edit 1: To clarify, this PR does not change the types for the main "." export. It only fixes the types for the "./matchers" export.

Edit 2: Looks like the husky/commit thing wasn't an issue and this is actually ready to be merged.

Copy link

codecov bot commented Jan 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1fb156c) 100.00% compared to head (c17239d) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #566   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           27        27           
  Lines          668       668           
  Branches       254       254           
=========================================
  Hits           668       668           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@gnapse gnapse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it looks good, but I'll wait for one or two other reviews from our maintainers before merging.

Also, does it make sense to keep matchers.d.ts if you are replacing its export with the new matchers-standalone.d.ts file?

@jakeboone02
Copy link
Contributor Author

jakeboone02 commented Jan 4, 2024

Yes, it makes sense because this new code is not replacing the matcher types in the main "." export. This PR only fixes the types for the "./matchers" export.

@jakeboone02
Copy link
Contributor Author

@gnapse Do you know if any other maintainers have looked at this? It's a relatively minor change, and as Bun (bun:test in particular) becomes more popular, this will avoid a lot of bug reports.

@gnapse
Copy link
Member

gnapse commented Jan 22, 2024

It does not seem like they've seen it, but let's see if we can go ahead with this.

One last question before we merge: are you confident that this is a patch release? On one hand, I'm wondering if it should be a minor release, as it adds a new feature (bun support). OTOH, I wonder if it isn't a breaking change even. It does not look like it, but I wanted to make sure first.

@jakeboone02
Copy link
Contributor Author

It does not seem like they've seen it, but let's see if we can go ahead with this.

One last question before we merge: are you confident that this is a patch release? On one hand, I'm wondering if it should be a minor release, as it adds a new feature (bun support). OTOH, I wonder if it isn't a breaking change even. It does not look like it, but I wanted to make sure first.

I would say it's a judgement call whether this is a patch or minor. You could argue that the addition of Bun support is "fixing a bug specific to Bun," but it does seem like a new feature in a way, so strictly speaking a minor might be more appropriate per semver.

I'm all but certain this is not a breaking change. The only reason I'm not completely certain is there are just too many different environments and configurations in JS/TS land to be 100% certain of anything.

@gnapse gnapse merged commit 5675b86 into testing-library:main Jan 22, 2024
7 checks passed
Copy link

🎉 This PR is included in version 6.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jakeboone02 jakeboone02 deleted the pr/matchers-standalone branch January 22, 2024 19:15
@axeleriksson147
Copy link

Hello @jakeboone02 and @gnapse

This breaks the TestingLibraryMatchers import for us in TypeScript. We have a file something like:

import { expect as _expect } from 'expect';
import { TestingLibraryMatchers } from '@testing-library/jest-dom/matchers';

declare module 'expect' {
  export interface Matchers<R = void> extends TestingLibraryMatchers<typeof _expect.stringContaining, R> {}
}

declare global {
  const expect: typeof _expect;
}

This way importing expect was including the extended TestingLibraryMatchers. With version 6.2.1 the import is incorrect.

@jakeboone02
Copy link
Contributor Author

@axeleriksson147 is the TestingLibraryMatchers type not available from the main "@testing-library/jest-dom" export? If you put a minimal repo together I'll take another look.

@gnapse
Copy link
Member

gnapse commented Jan 30, 2024

Thanks for taking a look @jakeboone02. Please keep me in the loop if something actionable comes from it (e.g. if we have something to change and release to make things right again).

@AxelEriksson0
Copy link

@gnapse and @jakeboone02 I created a minimal repo - https://github.com/AxelEriksson0/testing-library-jest-dom-6.2.0-breaking-type-location

My suggestion is to just export TestingLibraryMatchers in the matchers.standalone.ts.

@jakeboone02
Copy link
Contributor Author

@gnapse and @jakeboone02 I created a minimal repo - https://github.com/AxelEriksson0/testing-library-jest-dom-6.2.0-breaking-type-location

My suggestion is to just export TestingLibraryMatchers in the matchers.standalone.ts.

Thanks @AxelEriksson0! I patched the "broken" project with your suggestion and it seems to have done the trick.

If you think that resolves the issue I'll submit another PR.

@axeleriksson147
Copy link

@gnapse and @jakeboone02 I created a minimal repo - https://github.com/AxelEriksson0/testing-library-jest-dom-6.2.0-breaking-type-location
My suggestion is to just export TestingLibraryMatchers in the matchers.standalone.ts.

Thanks @AxelEriksson0! I patched the "broken" project with your suggestion and it seems to have done the trick.

If you think that resolves the issue I'll submit another PR.

Yeah, I think so. I just don't see TestingLibraryMatchers being exposed anymore, unless I'm missing something. But that should resolve it, thank you!

@jakeboone02
Copy link
Contributor Author

@AxelEriksson0 / @gnapse See #576.

@paulleonartcalvo
Copy link

@jakeboone02 Just came across this thread and am having what appears to be a unique issue. Im extending bun's expect with these matchers, but on error, some of the matchers like toBeInTheDocument cause errors related to the jest matcher utils like the following:

TypeError: this.utils.RECEIVED_COLOR is not a function. (In 'this.utils.RECEIVED_COLOR(this.isNot ? errorFound() : errorNotFound())', 'this.utils.RECEIVED_COLOR' is undefined)

Is this something that has been encountered or that a solution exists for?

@jakeboone02
Copy link
Contributor Author

@paulleonartcalvo can you provide a reproduction?

@paulleonartcalvo
Copy link

@jakeboone02 👍 I'll try and set up an environment tonight. For awareness, i was using Bun + typescript + React + Vite

zemnmez-renovate-bot added a commit to zemn-me/monorepo that referenced this pull request Oct 5, 2024
##### [`v6.5.0](https://github.com/testing-library/jest-dom/releases/tag/v6.5.0)

##### Features

-   **toHaveValue:** Asserting aria-valuenow ([#479](testing-library/jest-dom#479)) ([acbf416](testing-library/jest-dom@acbf416))
##### [`v6.4.8](https://github.com/testing-library/jest-dom/releases/tag/v6.4.8)

##### Bug Fixes

-   Drop peerDependencies from package.json ([#610](testing-library/jest-dom#610)) ([faf534b](testing-library/jest-dom@faf534b))
##### [`v6.4.7](https://github.com/testing-library/jest-dom/releases/tag/v6.4.7)

##### Bug Fixes

-   Type definition of `toHaveClass` ([#611](testing-library/jest-dom#611)) ([5cc6298](testing-library/jest-dom@5cc6298))
##### [`v6.4.6](https://github.com/testing-library/jest-dom/releases/tag/v6.4.6)

##### Bug Fixes

-   Support [@starting-style](https://github.com/starting-style) ([#602](testing-library/jest-dom#602)) ([fd9ee68](testing-library/jest-dom@fd9ee68))
##### [`v6.4.5](https://github.com/testing-library/jest-dom/releases/tag/v6.4.5)

##### Bug Fixes

-   add js suffix to isEqualWith import ([#599](testing-library/jest-dom#599)) ([e8c8b13](testing-library/jest-dom@e8c8b13))
##### [`v6.4.4](https://github.com/testing-library/jest-dom/releases/tag/v6.4.4)

##### Bug Fixes

-   **infra:** codecoverage token addition ([#600](testing-library/jest-dom#600)) ([f03a582](testing-library/jest-dom@f03a582))
##### [`v6.4.3](https://github.com/testing-library/jest-dom/releases/tag/v6.4.3)

##### Bug Fixes

-   Updates role support for aria-required attribute in `toBeRequired` ([#590](testing-library/jest-dom#590)) ([20aca33](testing-library/jest-dom@20aca33))
##### [`v6.4.2](https://github.com/testing-library/jest-dom/releases/tag/v6.4.2)

##### Bug Fixes

-   Remove errant export of GetByRoleMatcher, fixing type checking in some TS configurations ([#575](testing-library/jest-dom#575)) ([a93c0c4](testing-library/jest-dom@a93c0c4))
##### [`v6.4.1](https://github.com/testing-library/jest-dom/releases/tag/v6.4.1)

##### Bug Fixes

-   Export type `TestingLibraryMatchers` from "./matchers" ([#576](testing-library/jest-dom#576)) ([dd1c4dd](testing-library/jest-dom@dd1c4dd))
##### [`v6.4.0](https://github.com/testing-library/jest-dom/releases/tag/v6.4.0)

##### Features

-   Add toHaveRole matcher ([#572](testing-library/jest-dom#572)) ([f7dc673](testing-library/jest-dom@f7dc673))
##### [`v6.3.0](https://github.com/testing-library/jest-dom/releases/tag/v6.3.0)

##### Features

-   Support for regular expressions in toHaveClass ([#563](testing-library/jest-dom#563)) ([9787ed5](testing-library/jest-dom@9787ed5))
##### [`v6.2.1](https://github.com/testing-library/jest-dom/releases/tag/v6.2.1)

##### Bug Fixes

-   Standalone types for "./matchers" export and add Bun support ([#566](testing-library/jest-dom#566)) ([5675b86](testing-library/jest-dom@5675b86))
##### [`v6.2.0](https://github.com/testing-library/jest-dom/releases/tag/v6.2.0)

##### Features

-   toHaveAccessibleDescription supports aria-description ([#565](testing-library/jest-dom#565)) ([1fb156c](testing-library/jest-dom@1fb156c))
##### [`v6.1.6](https://github.com/testing-library/jest-dom/releases/tag/v6.1.6)

##### Bug Fixes

-   Upgrade [@adobe/css-tools](https://github.com/adobe/css-tools) to v4.3.2 ([#553](testing-library/jest-dom#553)) ([b64b953](testing-library/jest-dom@b64b953))
##### [`v6.1.5](https://github.com/testing-library/jest-dom/releases/tag/v6.1.5)

##### Bug Fixes

-   support uppercase custom props in toHaveStyle ([#552](testing-library/jest-dom#552)) ([b7b7c6a](testing-library/jest-dom@b7b7c6a))
##### [`v6.1.4](https://github.com/testing-library/jest-dom/releases/tag/v6.1.4)

##### Bug Fixes

-   upgrade `@adobe/css-tools` to `4.3.1` to address vulnerability ([#532](testing-library/jest-dom#532)) ([44f1eab](testing-library/jest-dom@44f1eab))
##### [`v6.1.3](https://github.com/testing-library/jest-dom/releases/tag/v6.1.3)

##### Bug Fixes

-   proper [@jest/globals](https://github.com/jest/globals) import ([#530](testing-library/jest-dom#530)) ([5b492ac](testing-library/jest-dom@5b492ac))
##### [`v6.1.2](https://github.com/testing-library/jest-dom/releases/tag/v6.1.2)

##### Bug Fixes

-   bump [@adobe/css-tools](https://github.com/adobe/css-tools) for ESM support ([#525](testing-library/jest-dom#525)) ([b959a68](testing-library/jest-dom@b959a68))
##### [`v6.1.1](https://github.com/testing-library/jest-dom/releases/tag/v6.1.1)

##### Bug Fixes

-   **package.json:** update main and module file paths ([#523](testing-library/jest-dom#523)) ([853a3e5](testing-library/jest-dom@853a3e5))
##### [`v6.1.0](https://github.com/testing-library/jest-dom/releases/tag/v6.1.0)

##### Features

-   Publish ESM and CJS (testing-library/jest-dom#519)
##### [`v6.0.1](https://github.com/testing-library/jest-dom/releases/tag/v6.0.1)

##### Bug Fixes

-   matchers type is making the global expect unsafe ([#513](testing-library/jest-dom#513)) ([bdb34f1](testing-library/jest-dom@bdb34f1))
##### [`v6.0.0](https://github.com/testing-library/jest-dom/releases/tag/v6.0.0)

##### Features

-   local types, supporting jest, [@jest/globals](https://github.com/jest/globals), vitest ([#511](testing-library/jest-dom#511)) ([4b764b9](testing-library/jest-dom@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](https://github.com/testing-library/jest-dom) - jest ([@types/jest](https://github.com/types/jest))
-   @testing-library/jest-dom/jest-globals - [@jest/globals](https://github.com/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
github-merge-queue bot pushed a commit to zemn-me/monorepo that referenced this pull request Oct 5, 2024
##### [`v6.5.0](https://github.com/testing-library/jest-dom/releases/tag/v6.5.0)

##### Features

-   **toHaveValue:** Asserting aria-valuenow ([#479](testing-library/jest-dom#479)) ([acbf416](testing-library/jest-dom@acbf416))
##### [`v6.4.8](https://github.com/testing-library/jest-dom/releases/tag/v6.4.8)

##### Bug Fixes

-   Drop peerDependencies from package.json ([#610](testing-library/jest-dom#610)) ([faf534b](testing-library/jest-dom@faf534b))
##### [`v6.4.7](https://github.com/testing-library/jest-dom/releases/tag/v6.4.7)

##### Bug Fixes

-   Type definition of `toHaveClass` ([#611](testing-library/jest-dom#611)) ([5cc6298](testing-library/jest-dom@5cc6298))
##### [`v6.4.6](https://github.com/testing-library/jest-dom/releases/tag/v6.4.6)

##### Bug Fixes

-   Support [@starting-style](https://github.com/starting-style) ([#602](testing-library/jest-dom#602)) ([fd9ee68](testing-library/jest-dom@fd9ee68))
##### [`v6.4.5](https://github.com/testing-library/jest-dom/releases/tag/v6.4.5)

##### Bug Fixes

-   add js suffix to isEqualWith import ([#599](testing-library/jest-dom#599)) ([e8c8b13](testing-library/jest-dom@e8c8b13))
##### [`v6.4.4](https://github.com/testing-library/jest-dom/releases/tag/v6.4.4)

##### Bug Fixes

-   **infra:** codecoverage token addition ([#600](testing-library/jest-dom#600)) ([f03a582](testing-library/jest-dom@f03a582))
##### [`v6.4.3](https://github.com/testing-library/jest-dom/releases/tag/v6.4.3)

##### Bug Fixes

-   Updates role support for aria-required attribute in `toBeRequired` ([#590](testing-library/jest-dom#590)) ([20aca33](testing-library/jest-dom@20aca33))
##### [`v6.4.2](https://github.com/testing-library/jest-dom/releases/tag/v6.4.2)

##### Bug Fixes

-   Remove errant export of GetByRoleMatcher, fixing type checking in some TS configurations ([#575](testing-library/jest-dom#575)) ([a93c0c4](testing-library/jest-dom@a93c0c4))
##### [`v6.4.1](https://github.com/testing-library/jest-dom/releases/tag/v6.4.1)

##### Bug Fixes

-   Export type `TestingLibraryMatchers` from "./matchers" ([#576](testing-library/jest-dom#576)) ([dd1c4dd](testing-library/jest-dom@dd1c4dd))
##### [`v6.4.0](https://github.com/testing-library/jest-dom/releases/tag/v6.4.0)

##### Features

-   Add toHaveRole matcher ([#572](testing-library/jest-dom#572)) ([f7dc673](testing-library/jest-dom@f7dc673))
##### [`v6.3.0](https://github.com/testing-library/jest-dom/releases/tag/v6.3.0)

##### Features

-   Support for regular expressions in toHaveClass ([#563](testing-library/jest-dom#563)) ([9787ed5](testing-library/jest-dom@9787ed5))
##### [`v6.2.1](https://github.com/testing-library/jest-dom/releases/tag/v6.2.1)

##### Bug Fixes

-   Standalone types for "./matchers" export and add Bun support ([#566](testing-library/jest-dom#566)) ([5675b86](testing-library/jest-dom@5675b86))
##### [`v6.2.0](https://github.com/testing-library/jest-dom/releases/tag/v6.2.0)

##### Features

-   toHaveAccessibleDescription supports aria-description ([#565](testing-library/jest-dom#565)) ([1fb156c](testing-library/jest-dom@1fb156c))
##### [`v6.1.6](https://github.com/testing-library/jest-dom/releases/tag/v6.1.6)

##### Bug Fixes

-   Upgrade [@adobe/css-tools](https://github.com/adobe/css-tools) to v4.3.2 ([#553](testing-library/jest-dom#553)) ([b64b953](testing-library/jest-dom@b64b953))
##### [`v6.1.5](https://github.com/testing-library/jest-dom/releases/tag/v6.1.5)

##### Bug Fixes

-   support uppercase custom props in toHaveStyle ([#552](testing-library/jest-dom#552)) ([b7b7c6a](testing-library/jest-dom@b7b7c6a))
##### [`v6.1.4](https://github.com/testing-library/jest-dom/releases/tag/v6.1.4)

##### Bug Fixes

-   upgrade `@adobe/css-tools` to `4.3.1` to address vulnerability ([#532](testing-library/jest-dom#532)) ([44f1eab](testing-library/jest-dom@44f1eab))
##### [`v6.1.3](https://github.com/testing-library/jest-dom/releases/tag/v6.1.3)

##### Bug Fixes

-   proper [@jest/globals](https://github.com/jest/globals) import ([#530](testing-library/jest-dom#530)) ([5b492ac](testing-library/jest-dom@5b492ac))
##### [`v6.1.2](https://github.com/testing-library/jest-dom/releases/tag/v6.1.2)

##### Bug Fixes

-   bump [@adobe/css-tools](https://github.com/adobe/css-tools) for ESM support ([#525](testing-library/jest-dom#525)) ([b959a68](testing-library/jest-dom@b959a68))
##### [`v6.1.1](https://github.com/testing-library/jest-dom/releases/tag/v6.1.1)

##### Bug Fixes

-   **package.json:** update main and module file paths ([#523](testing-library/jest-dom#523)) ([853a3e5](testing-library/jest-dom@853a3e5))
##### [`v6.1.0](https://github.com/testing-library/jest-dom/releases/tag/v6.1.0)

##### Features

-   Publish ESM and CJS (testing-library/jest-dom#519)
##### [`v6.0.1](https://github.com/testing-library/jest-dom/releases/tag/v6.0.1)

##### Bug Fixes

-   matchers type is making the global expect unsafe ([#513](testing-library/jest-dom#513)) ([bdb34f1](testing-library/jest-dom@bdb34f1))
##### [`v6.0.0](https://github.com/testing-library/jest-dom/releases/tag/v6.0.0)

##### Features

-   local types, supporting jest, [@jest/globals](https://github.com/jest/globals), vitest ([#511](testing-library/jest-dom#511)) ([4b764b9](testing-library/jest-dom@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](https://github.com/testing-library/jest-dom) - jest ([@types/jest](https://github.com/types/jest))
-   @testing-library/jest-dom/jest-globals - [@jest/globals](https://github.com/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
CrispyBaguette pushed a commit to CrispyBaguette/wasm-palette-converter that referenced this pull request Nov 8, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) | dependencies | major | [`^5.16.4` -> `^6.0.0`](https://renovatebot.com/diffs/npm/@testing-library%2fjest-dom/5.17.0/6.6.3) |

---

### Release Notes

<details>
<summary>testing-library/jest-dom (@&#8203;testing-library/jest-dom)</summary>

### [`v6.6.3`](https://github.com/testing-library/jest-dom/releases/tag/v6.6.3)

[Compare Source](testing-library/jest-dom@v6.6.2...v6.6.3)

##### Bug Fixes

-   add vitest import when extending vitest matchers ([#&#8203;646](testing-library/jest-dom#646)) ([5ba0156](testing-library/jest-dom@5ba0156))

### [`v6.6.2`](https://github.com/testing-library/jest-dom/releases/tag/v6.6.2)

[Compare Source](testing-library/jest-dom@v6.6.1...v6.6.2)

##### Bug Fixes

-   remove recursive type reference in vitest types ([#&#8203;636](testing-library/jest-dom#636)) ([4468378](testing-library/jest-dom@4468378))

### [`v6.6.1`](https://github.com/testing-library/jest-dom/releases/tag/v6.6.1)

[Compare Source](testing-library/jest-dom@v6.6.0...v6.6.1)

##### Bug Fixes

-   fix lodash import in to-have-selection.js ([#&#8203;642](testing-library/jest-dom#642)) ([ced792e](testing-library/jest-dom@ced792e))

### [`v6.6.0`](https://github.com/testing-library/jest-dom/releases/tag/v6.6.0)

[Compare Source](testing-library/jest-dom@v6.5.0...v6.6.0)

##### Features

-   implement toHaveSelection ([#&#8203;637](testing-library/jest-dom#637)) ([9b14804](testing-library/jest-dom@9b14804))

### [`v6.5.0`](https://github.com/testing-library/jest-dom/releases/tag/v6.5.0)

[Compare Source](testing-library/jest-dom@v6.4.8...v6.5.0)

##### Features

-   **toHaveValue:** Asserting aria-valuenow ([#&#8203;479](testing-library/jest-dom#479)) ([acbf416](testing-library/jest-dom@acbf416))

### [`v6.4.8`](https://github.com/testing-library/jest-dom/releases/tag/v6.4.8)

[Compare Source](testing-library/jest-dom@v6.4.7...v6.4.8)

##### Bug Fixes

-   Drop peerDependencies from package.json ([#&#8203;610](testing-library/jest-dom#610)) ([faf534b](testing-library/jest-dom@faf534b))

### [`v6.4.7`](https://github.com/testing-library/jest-dom/releases/tag/v6.4.7)

[Compare Source](testing-library/jest-dom@v6.4.6...v6.4.7)

##### Bug Fixes

-   Type definition of `toHaveClass` ([#&#8203;611](testing-library/jest-dom#611)) ([5cc6298](testing-library/jest-dom@5cc6298))

### [`v6.4.6`](https://github.com/testing-library/jest-dom/releases/tag/v6.4.6)

[Compare Source](testing-library/jest-dom@v6.4.5...v6.4.6)

##### Bug Fixes

-   Support [@&#8203;starting-style](https://github.com/starting-style) ([#&#8203;602](testing-library/jest-dom#602)) ([fd9ee68](testing-library/jest-dom@fd9ee68))

### [`v6.4.5`](https://github.com/testing-library/jest-dom/releases/tag/v6.4.5)

[Compare Source](testing-library/jest-dom@v6.4.4...v6.4.5)

##### Bug Fixes

-   add js suffix to isEqualWith import ([#&#8203;599](testing-library/jest-dom#599)) ([e8c8b13](testing-library/jest-dom@e8c8b13))

### [`v6.4.4`](https://github.com/testing-library/jest-dom/releases/tag/v6.4.4)

[Compare Source](testing-library/jest-dom@v6.4.3...v6.4.4)

##### Bug Fixes

-   **infra:** codecoverage token addition ([#&#8203;600](testing-library/jest-dom#600)) ([f03a582](testing-library/jest-dom@f03a582))

### [`v6.4.3`](https://github.com/testing-library/jest-dom/releases/tag/v6.4.3)

[Compare Source](testing-library/jest-dom@v6.4.2...v6.4.3)

##### Bug Fixes

-   Updates role support for aria-required attribute in `toBeRequired` ([#&#8203;590](testing-library/jest-dom#590)) ([20aca33](testing-library/jest-dom@20aca33))

### [`v6.4.2`](https://github.com/testing-library/jest-dom/releases/tag/v6.4.2)

[Compare Source](testing-library/jest-dom@v6.4.1...v6.4.2)

##### Bug Fixes

-   Remove errant export of GetByRoleMatcher, fixing type checking in some TS configurations ([#&#8203;575](testing-library/jest-dom#575)) ([a93c0c4](testing-library/jest-dom@a93c0c4))

### [`v6.4.1`](https://github.com/testing-library/jest-dom/releases/tag/v6.4.1)

[Compare Source](testing-library/jest-dom@v6.4.0...v6.4.1)

##### Bug Fixes

-   Export type `TestingLibraryMatchers` from "./matchers" ([#&#8203;576](testing-library/jest-dom#576)) ([dd1c4dd](testing-library/jest-dom@dd1c4dd))

### [`v6.4.0`](https://github.com/testing-library/jest-dom/releases/tag/v6.4.0)

[Compare Source](testing-library/jest-dom@v6.3.0...v6.4.0)

##### Features

-   Add toHaveRole matcher ([#&#8203;572](testing-library/jest-dom#572)) ([f7dc673](testing-library/jest-dom@f7dc673))

### [`v6.3.0`](https://github.com/testing-library/jest-dom/releases/tag/v6.3.0)

[Compare Source](testing-library/jest-dom@v6.2.1...v6.3.0)

##### Features

-   Support for regular expressions in toHaveClass ([#&#8203;563](testing-library/jest-dom#563)) ([9787ed5](testing-library/jest-dom@9787ed5))

### [`v6.2.1`](https://github.com/testing-library/jest-dom/releases/tag/v6.2.1)

[Compare Source](testing-library/jest-dom@v6.2.0...v6.2.1)

##### Bug Fixes

-   Standalone types for "./matchers" export and add Bun support ([#&#8203;566](testing-library/jest-dom#566)) ([5675b86](testing-library/jest-dom@5675b86))

### [`v6.2.0`](https://github.com/testing-library/jest-dom/releases/tag/v6.2.0)

[Compare Source](testing-library/jest-dom@v6.1.6...v6.2.0)

##### Features

-   toHaveAccessibleDescription supports aria-description ([#&#8203;565](testing-library/jest-dom#565)) ([1fb156c](testing-library/jest-dom@1fb156c))

### [`v6.1.6`](https://github.com/testing-library/jest-dom/releases/tag/v6.1.6)

[Compare Source](testing-library/jest-dom@v6.1.5...v6.1.6)

##### Bug Fixes

-   Upgrade [@&#8203;adobe/css-tools](https://github.com/adobe/css-tools) to v4.3.2 ([#&#8203;553](testing-library/jest-dom#553)) ([b64b953](testing-library/jest-dom@b64b953))

### [`v6.1.5`](https://github.com/testing-library/jest-dom/releases/tag/v6.1.5)

[Compare Source](testing-library/jest-dom@v6.1.4...v6.1.5)

##### Bug Fixes

-   support uppercase custom props in toHaveStyle ([#&#8203;552](testing-library/jest-dom#552)) ([b7b7c6a](testing-library/jest-dom@b7b7c6a))

### [`v6.1.4`](https://github.com/testing-library/jest-dom/releases/tag/v6.1.4)

[Compare Source](testing-library/jest-dom@v6.1.3...v6.1.4)

##### Bug Fixes

-   upgrade `@adobe/css-tools` to `4.3.1` to address vulnerability ([#&#8203;532](testing-library/jest-dom#532)) ([44f1eab](testing-library/jest-dom@44f1eab))

### [`v6.1.3`](https://github.com/testing-library/jest-dom/releases/tag/v6.1.3)

[Compare Source](testing-library/jest-dom@v6.1.2...v6.1.3)

##### Bug Fixes

-   proper [@&#8203;jest/globals](https://github.com/jest/globals) import ([#&#8203;530](testing-library/jest-dom#530)) ([5b492ac](testing-library/jest-dom@5b492ac))

### [`v6.1.2`](https://github.com/testing-library/jest-dom/releases/tag/v6.1.2)

[Compare Source](testing-library/jest-dom@v6.1.1...v6.1.2)

##### Bug Fixes

-   bump [@&#8203;adobe/css-tools](https://github.com/adobe/css-tools) for ESM support ([#&#8203;525](testing-library/jest-dom#525)) ([b959a68](testing-library/jest-dom@b959a68))

### [`v6.1.1`](https://github.com/testing-library/jest-dom/releases/tag/v6.1.1)

[Compare Source](testing-library/jest-dom@v6.1.0...v6.1.1)

##### Bug Fixes

-   **package.json:** update main and module file paths ([#&#8203;523](testing-library/jest-dom#523)) ([853a3e5](testing-library/jest-dom@853a3e5))

### [`v6.1.0`](https://github.com/testing-library/jest-dom/releases/tag/v6.1.0)

[Compare Source](testing-library/jest-dom@v6.0.1...v6.1.0)

##### Features

-   Publish ESM and CJS (testing-library/jest-dom#519)

### [`v6.0.1`](https://github.com/testing-library/jest-dom/releases/tag/v6.0.1)

[Compare Source](testing-library/jest-dom@v6.0.0...v6.0.1)

##### Bug Fixes

-   matchers type is making the global expect unsafe ([#&#8203;513](testing-library/jest-dom#513)) ([bdb34f1](testing-library/jest-dom@bdb34f1))

### [`v6.0.0`](https://github.com/testing-library/jest-dom/releases/tag/v6.0.0)

[Compare Source](testing-library/jest-dom@v5.17.0...v6.0.0)

##### Features

-   local types, supporting jest, [@&#8203;jest/globals](https://github.com/jest/globals), vitest ([#&#8203;511](testing-library/jest-dom#511)) ([4b764b9](testing-library/jest-dom@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:

-   [@&#8203;testing-library/jest-dom](https://github.com/testing-library/jest-dom) - jest ([@&#8203;types/jest](https://github.com/types/jest))
-   @&#8203;testing-library/jest-dom/jest-globals - [@&#8203;jest/globals](https://github.com/jest/globals)
-   @&#8203;testing-library/jest-dom/vitest - vitest

For example:

import '@&#8203;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 '@&#8203;testing-library/jest-dom/matchers'

-   Update kcd-scripts
-   Drop node < 14

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS44LjAiLCJ1cGRhdGVkSW5WZXIiOiIzOS44LjAiLCJ0YXJnZXRCcmFuY2giOiJtYXN0ZXIiLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://gitea.bruyant.xyz/alexandre/PaletteSwitcher/pulls/58
Co-authored-by: Renovate <[email protected]>
Co-committed-by: Renovate <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeScript types for the "./matchers" export don't match implementations
5 participants