From c5545a722268222e2877bc602afc845d47026119 Mon Sep 17 00:00:00 2001 From: Harminder Virk Date: Thu, 29 Jun 2023 11:48:07 +0530 Subject: [PATCH] fix: use unix separator when splitting paths to apply file filters --- src/files_manager.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/files_manager.ts b/src/files_manager.ts index e9e6ab7..34a91bc 100644 --- a/src/files_manager.ts +++ b/src/files_manager.ts @@ -8,7 +8,6 @@ */ import slash from 'slash' -import { sep } from 'node:path' import fastGlob from 'fast-glob' import { pathToFileURL } from 'node:url' import type { TestFiles } from './types.js' @@ -57,7 +56,7 @@ export class FilesManager { } const filterSegments = filter.split('/').reverse() - const fileSegments = filenameWithoutTestSuffix.split(sep).reverse() + const fileSegments = filenameWithoutTestSuffix.split('/').reverse() console.log({ filterSegments, fileSegments }) return filterSegments.every((segment, index) => {