@@ -4,6 +4,7 @@ import { describe, test, expect, afterAll, beforeAll } from 'vitest'
44
55import { File } from '../parser'
66import { FixtureSandbox } from '../../../testing/fixture-sandbox'
7+ import { pathToPosix } from '../../util'
78
89describe ( 'project parser - getFilesAndDependencies()' , { timeout : 45_000 } , ( ) => {
910 describe ( 'playwright-project' , ( ) => {
@@ -43,9 +44,9 @@ describe('project parser - getFilesAndDependencies()', { timeout: 45_000 }, () =
4344 } = JSON . parse ( result . stdout )
4445
4546 expect ( output . files ) . toEqual ( [
46- { physical : true , filePath : fixt . abspath ( 'package.json' ) } ,
47- { physical : true , filePath : fixt . abspath ( 'playwright.config.ts' ) } ,
48- { physical : true , filePath : fixt . abspath ( 'tests/ example.spec.ts' ) } ,
47+ { physical : true , filePath : pathToPosix ( fixt . abspath ( 'package.json' ) ) } ,
48+ { physical : true , filePath : pathToPosix ( fixt . abspath ( 'playwright.config.ts' ) ) } ,
49+ { physical : true , filePath : pathToPosix ( fixt . abspath ( 'tests' , ' example.spec.ts') ) } ,
4950 ] )
5051
5152 expect ( output . errors ) . toHaveLength ( 0 )
@@ -89,10 +90,10 @@ describe('project parser - getFilesAndDependencies()', { timeout: 45_000 }, () =
8990 } = JSON . parse ( result . stdout )
9091
9192 expect ( output . files ) . toEqual ( [
92- { physical : true , filePath : fixt . abspath ( 'package.json' ) } ,
93- { physical : true , filePath : fixt . abspath ( 'playwright.config.ts' ) } ,
94- { physical : true , filePath : fixt . abspath ( 'tests/example.spec.ts' ) } ,
95- { physical : true , filePath : fixt . abspath ( 'tests/ example.spec.ts-snapshots/Google-test-1-Mobile-Chrome-linux.png ') } ,
93+ { physical : true , filePath : pathToPosix ( fixt . abspath ( 'package.json' ) ) } ,
94+ { physical : true , filePath : pathToPosix ( fixt . abspath ( 'playwright.config.ts' ) ) } ,
95+ { physical : true , filePath : pathToPosix ( fixt . abspath ( 'tests/example.spec.ts' ) ) } ,
96+ { physical : true , filePath : expect . stringContaining ( ' example.spec.ts-snapshots') } ,
9697 ] )
9798
9899 expect ( output . errors ) . toHaveLength ( 0 )
0 commit comments