feat: adding basic unit tests and framework for them

This commit is contained in:
Lucas Oskorep
2025-10-17 02:06:16 -04:00
parent 8d4e51284d
commit 1ae379868b
6 changed files with 2675 additions and 0 deletions

23
jest.config.js Normal file
View File

@@ -0,0 +1,23 @@
export default {
preset: 'ts-jest/presets/default-esm',
testEnvironment: 'node',
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
transform: {
'^.+\\.ts$': [
'ts-jest',
{
useESM: true,
},
],
},
testMatch: ['**/__tests__/**/*.test.ts', '**/?(*.)+(spec|test).ts'],
collectCoverageFrom: [
'src/**/*.ts',
'!src/**/*.d.ts',
'!src/**/__tests__/**',
],
modulePathIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/node_modules/'],
};