Skip to content

Commit

Permalink
Typing extended-expect
Browse files Browse the repository at this point in the history
  • Loading branch information
qrg committed Jun 16, 2023
1 parent 3a95d22 commit a0a3fda
Show file tree
Hide file tree
Showing 6 changed files with 364 additions and 332 deletions.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const createJestConfig = nextJest({

// Add any custom config to be passed to Jest
const customJestConfig = {
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
testEnvironment: 'jest-environment-jsdom',
};

Expand Down
6 changes: 0 additions & 6 deletions jest.setup.js

This file was deleted.

16 changes: 16 additions & 0 deletions jest.setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Optional: configure or set up a testing framework before each test.
// If you delete this file, remove `setupFilesAfterEnv` from `jest.config.js`

// Used for __tests__/testing-library.js
// Learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom';

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

declare module '@jest/globals' {
type Matchers<R = void> = TestingLibraryMatchers<
typeof expect.stringContaining,
R
>;
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"@types/node": "18.16.16",
"@types/react": "18.2.8",
"@types/react-dom": "18.2.4",
"@types/testing-library__jest-dom": "5",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"@typescript-eslint/parser": "^5.59.9",
"eslint": "^8.42.0",
Expand Down
Loading

0 comments on commit a0a3fda

Please sign in to comment.