Started Adding Jest and Tests

This commit is contained in:
Ahmad 2024-12-28 17:36:50 -05:00
parent 542405be98
commit 64c366998e
No known key found for this signature in database
GPG key ID: 8FD8A93530D182BF
9 changed files with 3047 additions and 59 deletions

18
jest.config.ts Normal file
View file

@ -0,0 +1,18 @@
import type { Config } from 'jest';
import nextJest from 'next/jest.js';
const createJestConfig = nextJest({
dir: './',
});
const config: Config = {
coverageProvider: 'v8',
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/$1',
'content-collections': '<rootDir>/.content-collections/generated',
},
};
export default createJestConfig(config);