Passo 2: Configurando o Jest
Crie um arquivo de configuração jest.config.js na raiz do projeto:
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
testMatch: ['**/**/*.test.(ts|tsx|js)'],
};