/** @type {import('jest/dist/types').InitialOptionsTsJest} */ import type { Config } from 'jest/build/index'; const config:Config = { // preset: 'ts-jest', transform: { '^.+\\.tsx?$': [ 'esbuild-jest', { sourcemap:true, // bez ovog VS code umjesto originala prikazuje transpilirane datoteke target:'es2020' // ovo je nužno kako bi BigInt funkcionirao }] }, maxWorkers: 4, testEnvironment: 'node', moduleNameMapper: { }, // The root directory that Jest should scan for tests and modules within rootDir: "./", // A list of paths to directories that Jest should use to search for files in roots: [ "/tests", ], // The glob patterns Jest uses to detect test files testMatch: [ "**/?(*.)+(spec).[tj]s?(x)", ], // Automatically clear mock calls and instances between every test clearMocks: true, // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation transformIgnorePatterns: ["/node_modules/"], // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped testPathIgnorePatterns: ["/node_modules/", "/build/"], // Indicates whether each individual test should be reported during the run verbose: true, }; module.exports = config;