// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`jestProject --babelJest should generate proper jest.transform when --compiler=swc and supportTsx is true 1`] = `
"/* eslint-disable */
export default {
  displayName: 'lib1',
  preset: '../../jest.preset.js',
  transform: {
    '^.+\\\\.[tj]sx?$': [
      '@swc/jest',
      { jsc: { transform: { react: { runtime: 'automatic' } } } },
    ],
  },
  moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
  coverageDirectory: '../../coverage/libs/lib1',
};
"
`;

exports[`jestProject --babelJest should generate proper jest.transform when babelJest and supportTsx is true 1`] = `
"/* eslint-disable */
export default {
  displayName: 'lib1',
  preset: '../../jest.preset.js',
  transform: {
    '^.+\\\\.[tj]sx?$': 'babel-jest',
  },
  moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
  coverageDirectory: '../../coverage/libs/lib1',
};
"
`;

exports[`jestProject --babelJest should generate proper jest.transform when babelJest is true 1`] = `
"/* eslint-disable */
export default {
  displayName: 'lib1',
  preset: '../../jest.preset.js',
  transform: {
    '^.+\\\\.[tj]s$': 'babel-jest',
  },
  moduleFileExtensions: ['ts', 'js', 'html'],
  coverageDirectory: '../../coverage/libs/lib1',
};
"
`;

exports[`jestProject --setup-file should have setupFilesAfterEnv and globals.ts-jest in the jest.config when generated for angular 1`] = `
"/* eslint-disable */
export default {
  displayName: 'lib1',
  preset: '../../jest.preset.js',
  setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
  coverageDirectory: '../../coverage/libs/lib1',
  transform: {
    '^.+\\\\.(ts|mjs|js|html)$': [
      'jest-preset-angular',
      {
        tsconfig: '<rootDir>/tsconfig.spec.json',
        stringifyContentPathRegex: '\\\\.(html|svg)$',
      },
    ],
  },
  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',
  ],
};
"
`;

exports[`jestProject should create a jest.config.ts 1`] = `
"/* eslint-disable */
export default {
  displayName: 'lib1',
  preset: '../../jest.preset.js',
  coverageDirectory: '../../coverage/libs/lib1',
};
"
`;

exports[`jestProject should generate files 2`] = `
"/* eslint-disable */
export default {
  displayName: 'lib1',
  preset: '../../jest.preset.js',
  setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
  coverageDirectory: '../../coverage/libs/lib1',
  transform: {
    '^.+\\\\.(ts|mjs|js|html)$': [
      'jest-preset-angular',
      {
        tsconfig: '<rootDir>/tsconfig.spec.json',
        stringifyContentPathRegex: '\\\\.(html|svg)$',
      },
    ],
  },
  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',
  ],
};
"
`;

exports[`jestProject should use jest.config.js in project config with --js flag 1`] = `
{
  "configurations": {
    "ci": {
      "ci": true,
      "codeCoverage": true,
    },
  },
  "executor": "@nx/jest:jest",
  "options": {
    "jestConfig": "libs/lib1/jest.config.js",
    "passWithNoTests": true,
  },
  "outputs": [
    "{workspaceRoot}/coverage/{projectRoot}",
  ],
}
`;
