File tree Expand file tree Collapse file tree 4 files changed +11
-6
lines changed Expand file tree Collapse file tree 4 files changed +11
-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 11import assert from "node:assert/strict" ;
22import util from "node:util" ;
33
4+ import { toPosix } from "./helpers/posix" ;
45import {
56 combineIntoConfiguration ,
67 ICypressRuntimeConfiguration ,
@@ -56,7 +57,7 @@ function example(
5657 }
5758
5859 for ( let i = 0 ; i < expected . length ; i ++ ) {
59- if ( expected [ i ] !== actual [ i ] ) {
60+ if ( expected [ i ] !== toPosix ( actual [ i ] ) ) {
6061 throwUnequal ( ) ;
6162 }
6263 }
@@ -70,7 +71,7 @@ describe("pathParts()", () => {
7071 it ( `should return ${ util . inspect ( expectedParts ) } for ${ util . inspect (
7172 relativePath ,
7273 ) } `, ( ) => {
73- assert . deepEqual ( pathParts ( relativePath ) , expectedParts ) ;
74+ assert . deepEqual ( pathParts ( relativePath ) . map ( toPosix ) , expectedParts ) ;
7475 } ) ;
7576} ) ;
7677
Original file line number Diff line number Diff line change @@ -5,13 +5,11 @@ import type esbuild from "esbuild";
55
66import { ensure } from "../helpers/assertions" ;
77import { default as origDebug } from "../helpers/debug" ;
8+ import { toPosix } from "../helpers/posix" ;
89import { compile } from "../template" ;
910
1011const debug = origDebug . extend ( "esbuild" ) ;
1112
12- const toPosix = ( location : string ) =>
13- path . sep === "\\" ? location . replaceAll ( "\\" , "/" ) : location ;
14-
1513export function createEsbuildPlugin (
1614 configuration : Cypress . PluginConfigOptions ,
1715 options : { prettySourceMap : boolean } = { prettySourceMap : false } ,
You can’t perform that action at this time.
0 commit comments