After making adjustments to the jest.config.js file as shown below, I was able to resolve my problem:
module.exports = {
displayName: 'UpdatedAppName',
preset: '../../modified-jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/updated-tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
coverageDirectory: '../../coverage/libs/modifiedAppName',
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular-modified',
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
testRunner: 'jest-jasmine2'
};