Skip to content

Commit

Permalink
feat: support case-insensitive path matching in cli (fix vitest-dev#3567
Browse files Browse the repository at this point in the history
)
  • Loading branch information
tigranmk committed Jan 11, 2024
1 parent 528bd55 commit 6732a8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/vitesse/src/auto-import.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ declare global {
// for type re-export
declare global {
// @ts-ignore
export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue'
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
}
4 changes: 2 additions & 2 deletions packages/vitest/src/node/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,10 @@ export class WorkspaceProject {

if (filters.length) {
return testFiles.filter((t) => {
const testFile = relative(dir, t)
const testFile = relative(dir, t).toLocaleLowerCase()
return filters.some((f) => {
const relativePath = f.endsWith('/') ? join(relative(dir, f), '/') : relative(dir, f)
return testFile.includes(f) || testFile.includes(relativePath)
return testFile.includes(f.toLocaleLowerCase()) || testFile.includes(relativePath.toLocaleLowerCase())
})
})
}
Expand Down

0 comments on commit 6732a8d

Please sign in to comment.