fix(ci): isolate mock.module tests per-file to prevent cross-contamination
This commit is contained in:
@@ -29,13 +29,7 @@ async function usesModuleMock(rootDirectory: string, testFile: string): Promise<
|
|||||||
}
|
}
|
||||||
|
|
||||||
function toIsolatedTarget(testFile: string): string {
|
function toIsolatedTarget(testFile: string): string {
|
||||||
const pathSegments = testFile.split("/")
|
return testFile
|
||||||
|
|
||||||
if (pathSegments.length <= 3) {
|
|
||||||
return testFile
|
|
||||||
}
|
|
||||||
|
|
||||||
return pathSegments.slice(0, -1).join("/")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function isCoveredByTarget(testFile: string, isolatedTarget: string): boolean {
|
function isCoveredByTarget(testFile: string, isolatedTarget: string): boolean {
|
||||||
|
|||||||
Reference in New Issue
Block a user