affectedTestFiles needs OS-specific paths

This commit is contained in:
Simon Knott 2024-07-19 12:34:58 +02:00 committed by Simon Knott
parent 1665d8ff60
commit b9fe83071c
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -152,7 +152,7 @@ export async function detectChangedFiles(testRun: TestRun): Promise<string[]> {
const [gitRoot] = gitFileList('rev-parse --show-toplevel'); const [gitRoot] = gitFileList('rev-parse --show-toplevel');
const trackedFilesWithChanges = gitFileList(`diff ${baseCommit} --name-only`).map(file => path.join(gitRoot, file)); const trackedFilesWithChanges = gitFileList(`diff ${baseCommit} --name-only`).map(file => path.join(gitRoot, file));
const filesWithChanges = [...untrackedFiles, ...trackedFilesWithChanges].map(toPosixPath); const filesWithChanges = [...untrackedFiles, ...trackedFilesWithChanges];
for (const plugin of testRun.config.plugins) for (const plugin of testRun.config.plugins)
await plugin.instance?.populateDependencies?.(); await plugin.instance?.populateDependencies?.();
@ -161,7 +161,7 @@ export async function detectChangedFiles(testRun: TestRun): Promise<string[]> {
return [ return [
...filesWithChanges, ...filesWithChanges,
...affectedFiles, ...affectedFiles,
]; ].map(toPosixPath);
} }
export async function createRootSuite(testRun: TestRun, errors: TestError[], shouldFilterOnly: boolean, onlyChangedFiles?: string[]): Promise<Suite> { export async function createRootSuite(testRun: TestRun, errors: TestError[], shouldFilterOnly: boolean, onlyChangedFiles?: string[]): Promise<Suite> {