Update to @testing-library/jest-dom:6.0.0

This commit is contained in:
Alejandro Celaya 2023-08-15 09:53:28 +02:00
parent 30c07c6790
commit 9758e7ed8c
3 changed files with 31 additions and 1020 deletions

View file

@ -1,15 +1,6 @@
import type { TestingLibraryMatchers } from '@testing-library/jest-dom/matchers';
import matchers from '@testing-library/jest-dom/matchers';
import '@testing-library/jest-dom/vitest';
import { cleanup } from '@testing-library/react';
import { afterEach, expect } from 'vitest';
// Workaround for TypeScript error: https://github.com/testing-library/jest-dom/issues/439#issuecomment-1536524120
declare module 'vitest' {
interface Assertion<T = any> extends jest.Matchers<void, T>, TestingLibraryMatchers<T, void> {}
}
// Extends Vitest's expect method with methods from react-testing-library
expect.extend(matchers);
import { afterEach } from 'vitest';
// Clear all mocks and cleanup DOM after every test
afterEach(() => {

1036
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -57,7 +57,7 @@
"devDependencies": {
"@shlinkio/eslint-config-js-coding-standard": "~2.2.0",
"@shlinkio/stylelint-config-css-coding-standard": "~1.1.1",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/jest-dom": "^6.0.0",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@total-typescript/shoehorn": "^0.1.1",