From e8a6ef687b6a8100b50bd503ca2b34570a825b19 Mon Sep 17 00:00:00 2001 From: Patrick Organ Date: Sun, 17 Nov 2024 17:57:08 -0500 Subject: [PATCH] wip --- jest.config.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/jest.config.js b/jest.config.js index 3c2bd1f..9b67487 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,21 +1,21 @@ -const { pathsToModuleNameMapper } = require('ts-jest'); -//const { compilerOptions } = require('./tsconfig.json'); +import { pathsToModuleNameMapper } from 'ts-jest'; + const tsConfigPaths = { - '@/*': ['src/*'], - '@tests/*': ['tests/*'], + '@/*': [ 'src/*' ], + '@tests/*': [ 'tests/*' ], }; /** @type {import('@jest/types').Config.InitialOptions } */ -module.exports = { +export default { preset: 'ts-jest/presets/js-with-ts', testEnvironment: 'node', transform: { '^.+\\.tsx?$': 'ts-jest' }, testRegex: '(/__test__/.*|/tests/.*|(\\.|/)(test|spec))\\.[tj]sx?$', - testPathIgnorePatterns: ['/node_modules/', '/dist/'], - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'], + testPathIgnorePatterns: [ '/node_modules/', '/dist/' ], + moduleFileExtensions: [ 'ts', 'tsx', 'js', 'jsx', 'json' ], moduleNameMapper: pathsToModuleNameMapper(tsConfigPaths, { prefix: `${__dirname}/` }), coverageDirectory: './coverage', - coverageReporters: ['html', 'text'], - collectCoverageFrom: ['src/**/*.{ts,js}', '!**/node_modules/**', '!**/vendor/**', '!**/dist/**', '!**/tests/**'], + coverageReporters: [ 'html', 'text' ], + collectCoverageFrom: [ 'src/**/*.{ts,js}', '!**/node_modules/**', '!**/vendor/**', '!**/dist/**', '!**/tests/**' ], };