File tree Expand file tree Collapse file tree 4 files changed +13
-6
lines changed Expand file tree Collapse file tree 4 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 8989 run : npm install --engine-strict
9090 - name : Build
9191 run : npm run build
92- - name : Test
92+ - name : Test (unit)
93+ run : npm run test:unit
94+ - name : Test (integration)
9395 run : npm run test:integration
9496 - name : Versions
9597 run : |
Original file line number Diff line number Diff line change 1+ import path from "node:path" ;
2+
3+ export const toPosix = ( location : string ) =>
4+ path . sep === "\\" ? location . replaceAll ( "\\" , "/" ) : location ;
Original file line number Diff line number Diff line change 88} from "./preprocessor-configuration" ;
99import { getStepDefinitionPatterns , pathParts } from "./step-definitions" ;
1010
11+ import { toPosix } from "./helpers/posix" ;
12+
1113const DUMMY_CONFIG : ICypressRuntimeConfiguration = {
1214 testingType : "e2e" ,
1315 projectRoot : "" ,
@@ -56,7 +58,7 @@ function example(
5658 }
5759
5860 for ( let i = 0 ; i < expected . length ; i ++ ) {
59- if ( expected [ i ] !== actual [ i ] ) {
61+ if ( expected [ i ] !== toPosix ( actual [ i ] ) ) {
6062 throwUnequal ( ) ;
6163 }
6264 }
@@ -70,7 +72,7 @@ describe("pathParts()", () => {
7072 it ( `should return ${ util . inspect ( expectedParts ) } for ${ util . inspect (
7173 relativePath ,
7274 ) } `, ( ) => {
73- assert . deepEqual ( pathParts ( relativePath ) , expectedParts ) ;
75+ assert . deepEqual ( pathParts ( relativePath ) . map ( toPosix ) , expectedParts ) ;
7476 } ) ;
7577} ) ;
7678
Original file line number Diff line number Diff line change @@ -7,10 +7,9 @@ import { ensure } from "../helpers/assertions";
77import { default as origDebug } from "../helpers/debug" ;
88import { compile } from "../template" ;
99
10- const debug = origDebug . extend ( "esbuild" ) ;
10+ import { toPosix } from "../helpers/posix" ;
1111
12- const toPosix = ( location : string ) =>
13- path . sep === "\\" ? location . replaceAll ( "\\" , "/" ) : location ;
12+ const debug = origDebug . extend ( "esbuild" ) ;
1413
1514export function createEsbuildPlugin (
1615 configuration : Cypress . PluginConfigOptions ,
You can’t perform that action at this time.
0 commit comments