Skip to content

Commit

Permalink
update to 0.10.79 (#71)
Browse files Browse the repository at this point in the history
add sharp
add testing support
  • Loading branch information
craigrbarnes authored Feb 3, 2025
1 parent fa75647 commit d16da33
Show file tree
Hide file tree
Showing 8 changed files with 1,654 additions and 43 deletions.
32 changes: 32 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import type { JestConfigWithTsJest } from 'ts-jest';

const jestConfig: JestConfigWithTsJest = {
preset: 'ts-jest',
rootDir: __dirname,
roots: ['<rootDir>/src'],
moduleNameMapper: {
'^@/components(.*)$': '<rootDir>/src/components/$1',
'^@/lib/(.*)$': '<rootDir>/src/lib/$1',
'^redux-persist/lib/storage/createWebStorage$':
'<rootDir>/__mocks__/createWebStorageMock.js',
},
testEnvironment: 'jest-fixed-jsdom',
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
transform: {
'^.+\\.(ts|tsx)?$': [
'ts-jest',
{
isolatedModules: true,
tsconfig: 'tsconfig.test.json',
},
],
'node_modules/(flat|jsonpath-plus|uuid)/.+\\.(j|t)sx?$': ['ts-jest', {}],
},
transformIgnorePatterns: ['/node_modules/(?!(flat|jsonpath-plus|uuid))'],
modulePaths: ['<rootDir>'],
globals: {
fetch: global.fetch,
},
};

export default jestConfig;
4 changes: 4 additions & 0 deletions jest.setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import '@testing-library/jest-dom';
import { loadEnvConfig } from '@next/env';

loadEnvConfig(__dirname, true, { info: () => null, error: console.error });
Loading

0 comments on commit d16da33

Please sign in to comment.