Skip to content

Commit

Permalink
fix: exclude/include configs and missing workspacePath (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
mash-graz committed Nov 14, 2023
1 parent 292e272 commit bee4f6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ export function getConfig(workspaceFolder?: WorkspaceFolder | vscode.Uri | strin
export function getCombinedConfig(config: ResolvedConfig, workspaceFolder?: WorkspaceFolder | vscode.Uri | string) {
const vitestConfig = getConfig(workspaceFolder)
return {
exclude: vitestConfig.exclude || config.exclude || configDefaults.exclude,
include: vitestConfig.include || config.include || configDefaults.include,
exclude: vitestConfig.exclude?.concat(config.exclude) || configDefaults.exclude,
include: vitestConfig.include?.concat(config.include) || configDefaults.include,
}
}

Expand Down
1 change: 1 addition & 0 deletions src/discover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export class TestFileDiscoverer extends vscode.Disposable {

await Promise.all(
vscode.workspace.workspaceFolders.map(async (workspaceFolder) => {
const workspacePath = workspaceFolder.uri.fsPath
const exclude = getCombinedConfig(this.config, workspaceFolder).exclude
for (const include of getCombinedConfig(this.config, workspaceFolder).include) {
const pattern = new vscode.RelativePattern(
Expand Down

0 comments on commit bee4f6e

Please sign in to comment.