Skip to content

Commit

Permalink
fix(testing): first generated cypress project should not include tsco…
Browse files Browse the repository at this point in the history
…nfig specification (#7629)

Closes #6917
  • Loading branch information
AgentEnder authored and FrozenPandaz committed Nov 11, 2021
1 parent fcaecde commit b312696
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -20,7 +20,10 @@ import { runTasksInSerial } from '@nrwl/workspace/src/utilities/run-tasks-in-ser
import { join } from 'path';
// app
import { Schema } from './schema';
import { eslintPluginCypressVersion } from '../../utils/versions';
import {
cypressVersion,
eslintPluginCypressVersion,
} from '../../utils/versions';
import { filePathPrefix } from '../../utils/project-name';
import { installedCypressVersion } from '../../utils/cypress-version';

Expand Down Expand Up @@ -84,7 +87,8 @@ function addProject(tree: Tree, options: CypressProjectSchema) {
tags: [],
implicitDependencies: options.project ? [options.project] : undefined,
};
if (installedCypressVersion() < 7) {
const detectedCypressVersion = installedCypressVersion() ?? cypressVersion;
if (detectedCypressVersion < 7) {
project.targets.e2e.options.tsConfig = joinPathFragments(
options.projectRoot,
'tsconfig.json'
Expand Down

0 comments on commit b312696

Please sign in to comment.