import { Tree } from '@nrwl/devkit'; import { jestProjectGenerator } from '@nrwl/jest'; import { NormalizedSchema } from '../schema'; export async function addJest(host: Tree, options: NormalizedSchema) { if (options.unitTestRunner !== 'jest') { return () => {}; } return await jestProjectGenerator(host, { ...options, project: options.projectName, supportTsx: true, skipSerializers: true, setupFile: 'none', compiler: options.compiler, rootProject: options.rootProject, }); }