Skip to content

Commit

Permalink
fix(testing): fix cypress 8.2 for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenPandaz authored and vsavkin committed Jun 27, 2019
1 parent 7640598 commit 3b699da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/cypress/src/builders/cypress/cypress.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ function isLegacy(
tsconfigJson.compilerOptions.outDir
);

return !relative(tsOutDirPath, integrationFolder).startsWith('../');
return !relative(tsOutDirPath, integrationFolder).startsWith('..');
}

function showLegacyWarning(context: BuilderContext) {
Expand Down
11 changes: 7 additions & 4 deletions packages/cypress/src/migrations/update-8-2-0/update-8-2-0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
ScriptTarget
} from 'typescript';
import { dirname, join, relative } from 'path';
import { normalize } from '@angular-devkit/core';

async function updateCypressJson(host: Tree, context: SchematicContext) {
const rules: Rule[] = [];
Expand Down Expand Up @@ -57,11 +58,13 @@ async function updateCypressJson(host: Tree, context: SchematicContext) {
}
return (
'./' +
relative(
dirname(target.options.cypressConfig as string),
normalize(
relative(
'./' + tsConfig.options.outDir,
join(dirname(target.options.cypressConfig as string), path)
dirname(target.options.cypressConfig as string),
relative(
'./' + tsConfig.options.outDir,
join(dirname(target.options.cypressConfig as string), path)
)
)
)
);
Expand Down

0 comments on commit 3b699da

Please sign in to comment.