Skip to content

Commit

Permalink
Jest config update (#545)
Browse files Browse the repository at this point in the history
  • Loading branch information
FloEdelmann committed Apr 25, 2024
1 parent a1eb2b4 commit fbb57bf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 4 additions & 3 deletions jest.config.ts
Expand Up @@ -4,10 +4,11 @@ const config: JestConfigWithTsJest = {
clearMocks: true,
preset: 'ts-jest',
transform: {
'^.+\\.tsx?$': 'ts-jest/legacy',
'^.+\\.tsx?$': 'ts-jest',
},
testMatch: ['**/tests/**/*.spec.ts'],
setupFilesAfterEnv: ['jest-extended/all'],
testMatch: ['<rootDir>/tests/**/*.spec.ts'],
setupFilesAfterEnv: ['<rootDir>/tests/jest-setup.ts'],
injectGlobals: false,
};

export default config;
4 changes: 4 additions & 0 deletions tests/jest-setup.ts
@@ -0,0 +1,4 @@
import { expect } from '@jest/globals';
import * as matchers from 'jest-extended';

expect.extend(matchers);
2 changes: 1 addition & 1 deletion tstyche.config.json
@@ -1,4 +1,4 @@
{
"$schema": "https://tstyche.org/schemas/config.json",
"testFileMatch": ["**/type-tests/**/*.type.spec.ts"]
"testFileMatch": ["./type-tests/**/*.type.spec.ts"]
}

0 comments on commit fbb57bf

Please sign in to comment.