You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
618 B

6 months ago
  1. import type { Config } from 'jest';
  2. import nextJest from 'next/jest.js';
  3. const createJestConfig = nextJest({
  4. // Provide the path to your Next.js app to load next.config.js and .env files in your test environment
  5. dir: './',
  6. });
  7. // Add any custom config to be passed to Jest
  8. const config: Config = {
  9. coverageProvider: 'v8',
  10. testEnvironment: 'jsdom',
  11. // Add more setup options before each test is run
  12. // setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
  13. };
  14. // createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
  15. export default createJestConfig(config);