fix linting

This commit is contained in:
Elio Bischof
2023-06-07 15:34:06 +02:00
parent 23ced28469
commit 3cad0828e7
15 changed files with 103 additions and 101 deletions

View File

@@ -1,22 +1,26 @@
import type { Config } from '@jest/types';
import { pathsToModuleNameMapper } from 'ts-jest'
import { compilerOptions } from './tsconfig.json';
import type { Config } from "@jest/types";
import { pathsToModuleNameMapper } from "ts-jest";
import { compilerOptions } from "./tsconfig.json";
export default async (): Promise<Config.InitialOptions> => {
return {
preset: 'ts-jest',
preset: "ts-jest",
transform: {
"^.+\\.tsx?$": ['ts-jest', {tsconfig:'./__test__/tsconfig.json'}],
"^.+\\.tsx?$": ["ts-jest", { tsconfig: "./__test__/tsconfig.json" }],
},
setupFilesAfterEnv: [
'@testing-library/jest-dom/extend-expect',
],
setupFilesAfterEnv: ["@testing-library/jest-dom/extend-expect"],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix:'<rootDir>/'
prefix: "<rootDir>/",
}),
testEnvironment: 'jsdom',
testRegex: '/__test__/.*\\.test\\.tsx?$',
modulePathIgnorePatterns: ['cypress'],
reporters: [[ 'jest-silent-reporter', { useDots: true, showWarnings: true, showPaths: true } ], 'summary']
testEnvironment: "jsdom",
testRegex: "/__test__/.*\\.test\\.tsx?$",
modulePathIgnorePatterns: ["cypress"],
reporters: [
[
"jest-silent-reporter",
{ useDots: true, showWarnings: true, showPaths: true },
],
"summary",
],
};
};
};