···284284 return testFiles.filter((t) => {
285285 const testFile = relative(dir, t).toLocaleLowerCase()
286286 return filters.some((f) => {
287287- const relativePath = f.endsWith('/') ? join(relative(dir, f), '/') : relative(dir, f)
288288-289287 // if filter is a full file path, we should include it if it's in the same folder
290290- if (isAbsolute(f)) {
291291- // the file is inside the filter path, so we should always include it,
292292- // we don't include ../file because this condition is always true if
293293- // the file doens't exist which cause false positives
294294- if (relativePath === '..' || relativePath === '../' || relativePath.startsWith('../..'))
295295- return true
296296- }
288288+ if (isAbsolute(f) && t.startsWith(f))
289289+ return true
297290291291+ const relativePath = f.endsWith('/') ? join(relative(dir, f), '/') : relative(dir, f)
298292 return testFile.includes(f.toLocaleLowerCase()) || testFile.includes(relativePath.toLocaleLowerCase())
299293 })
300294 })
+3
test/filters/fixtures-slash/test/basic.test.ts
···11+import { test } from 'vitest'
22+33+test('example', () => {})