import { InitialProjectOptions } from '@jest/types/build/Config' ; import { InitialOptionsTsJest } from 'ts-jest' ; const ES_MODULE_DEPENDENCIES = [ '@abraham/remotedata' , '@lit' , '@material' , 'lit' , 'pwa-helpers' , 'testing-library__dom' , ] . join ( '|' ) ; const config = { projects : [ { displayName : 'Web' , preset : 'ts-jest' , setupFilesAfterEnv : [ '<rootDir>/__tests__/web.setup.ts' ] , testEnvironment : 'jsdom' , testMatch : [ '<rootDir>/src/**/*.test.ts' ] , transform : { '^.+\\.[t|j]sx?$' : 'ts-jest' } , transformIgnorePatterns : [ `node_modules/(?!${ ES_MODULE_DEPENDENCIES })` ] , } as InitialProjectOptions , { displayName : 'Firestore' , preset : 'ts-jest' , setupFilesAfterEnv : [ '<rootDir>/__tests__/firestore.setup.ts' ] , testMatch : [ '<rootDir>/**/*.rules.test.ts' ] , } as InitialProjectOptions , ] , } ; export default config ;