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 10, 2024
1 parent a73c1c2 commit 3331fbf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 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/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ export class Vitest {
await this.coverageProvider.clean()

await this.report('onWatcherRerun', files, trigger)
await this.runFiles(files.flatMap(file => this.getProjectsByTestFile(file)))
await this.runFiles(files.flatMap(file => this.getProjectsByTestFile(file.toLocaleLowerCase())))

await this.reportCoverage(!trigger)

Expand Down Expand Up @@ -638,7 +638,7 @@ export class Vitest {
const triggerLabel = Array.from(triggerIds).join(', ')
await this.report('onWatcherRerun', files, triggerLabel)

await this.runFiles(files.flatMap(file => this.getProjectsByTestFile(file)))
await this.runFiles(files.flatMap(file => this.getProjectsByTestFile(file.toLocaleLowerCase())))

await this.reportCoverage(false)

Expand Down
2 changes: 1 addition & 1 deletion packages/vitest/src/node/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class WorkspaceProject {
typecheck.enabled ? this.globFiles(typecheck.include, typecheck.exclude, dir) : [],
])

return this.filterFiles([...testFiles, ...typecheckTestFiles], filters, dir)
return this.filterFiles([...testFiles, ...typecheckTestFiles].map(filter => filter.toLocaleLowerCase()), filters.map(filter => filter.toLocaleLowerCase()), dir)
}

async globAllTestFiles(include: string[], exclude: string[], includeSource: string[] | undefined, cwd: string) {
Expand Down

0 comments on commit 3331fbf

Please sign in to comment.