Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: testing-library/jest-dom
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.16.5
Choose a base ref
...
head repository: testing-library/jest-dom
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v6.4.0
Choose a head ref
  • 18 commits
  • 52 files changed
  • 16 contributors

Commits on Jul 18, 2023

  1. feat: New toHaveAccessibleErrorMessage better implementing the spec…

    …, deprecate `toHaveErrorMessage` (#503)
    
    * fix: Conform `toHaveErrorMessage` to Spec and Rename
    
    Included Changes:
    - According to the WAI-ARIA spec, passing an invalid
      `id` to `aria-errormessage` now fails assertion.
      This means that any empty spaces inside
      `aria-errormessage` will now cause test failures.
    
    - According to the WAI-ARIA spec, developers can now
      assert that an accessible error message is missing
      if `aria-invalid` is `false` (or if the
      `aria-errormessage` attribute is invalid).
    
    - Updated the error message and test cases surrounding
      the requirement for `aria-invalid`. They are now
      more detailed/accurate.
    
    - Renamed `toHaveErrorMessage` to
      `toHaveAccessibleErrorMessage` to be consistent with
      the other a11y-related methods (`toHaveAccessibleName`
      and `toHaveAccessibleDescription`).
       - Note: This deprecates the previous
       `toHaveErrorMessage` method.
    
    - Updated documentation. Similar to the
      `toHaveAccessibleDescription` method, this description
      is much more lean, as the reader can simply read the
      WAI ARIA spec for additional details/requirements.
    
    * refactor: Simplify Exports from `matchers.js`
    
    This makes the code easier to maintain as more
    exports are added.
    ITenthusiasm authored Jul 18, 2023
    Copy the full SHA
    d717c66 View commit details

Commits on Aug 13, 2023

  1. feat: local types, supporting jest, @jest/globals, vitest (#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
    jgoz authored Aug 13, 2023
    Copy the full SHA
    4b764b9 View commit details

Commits on Aug 18, 2023

  1. fix: matchers type is making the global expect unsafe (#513)

    * fix: matchers type is making the global expect unsafe
    
    * Add test file for TypeScript typings
    
    * Remove jest specifics from matchers.d.ts
    
    * Type tests for all test environments
    
    * Fix all AsymmetricMatcher interfaces
    
    * Ignore type tests from eslint
    
    ---------
    
    Co-authored-by: Michael Manzinger <[email protected]>
    Co-authored-by: John Gozde <[email protected]>
    3 people authored Aug 18, 2023
    Copy the full SHA
    bdb34f1 View commit details

Commits on Aug 22, 2023

  1. chore: Publish ESM and CJS (#519)

    * Add rollup config
    
    * Sort dependencies in package.json
    
    * Clean output folder before build
    
    * Use relative paths for entries
    
    * Convert cjs to esm if needed
    
    * Add extensions to lodash imports
    
    To support node16 resolution
    
    * Ignore coverage for vitest and jest-globals
    IanVS authored Aug 22, 2023
    Copy the full SHA
    61d17bd View commit details

Commits on Aug 23, 2023

  1. Copy the full SHA
    3d834bb View commit details
  2. Copy the full SHA
    853a3e5 View commit details

Commits on Aug 24, 2023

  1. Copy the full SHA
    b959a68 View commit details

Commits on Sep 6, 2023

  1. Copy the full SHA
    5b492ac View commit details

Commits on Sep 7, 2023

  1. Copy the full SHA
    6d65999 View commit details

Commits on Oct 12, 2023

  1. Copy the full SHA
    44f1eab View commit details

Commits on Nov 24, 2023

  1. Copy the full SHA
    4ae0231 View commit details

Commits on Nov 30, 2023

  1. Copy the full SHA
    b7b7c6a View commit details

Commits on Dec 13, 2023

  1. Copy the full SHA
    746c6ca View commit details

Commits on Dec 27, 2023

  1. Copy the full SHA
    b64b953 View commit details

Commits on Jan 3, 2024

  1. Copy the full SHA
    1fb156c View commit details

Commits on Jan 22, 2024

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

    jakeboone02 authored Jan 22, 2024
    Copy the full SHA
    5675b86 View commit details

Commits on Jan 24, 2024

  1. feat: Support for regular expressions in toHaveClass (#563)

    gnapse authored Jan 24, 2024
    Copy the full SHA
    9787ed5 View commit details

Commits on Jan 30, 2024

  1. feat: Add toHaveRole matcher (#572)

    fpapado authored Jan 30, 2024
    Copy the full SHA
    f7dc673 View commit details
Loading