Skip to content

Commit

Permalink
fix: filter out invalid files (#1553)
Browse files Browse the repository at this point in the history
  • Loading branch information
nieyuyao committed Jun 27, 2022
1 parent 2244c17 commit b054cd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vitest/src/node/state.ts
Expand Up @@ -21,7 +21,7 @@ export class StateManager {

getFiles(keys?: string[]): File[] {
if (keys)
return keys.map(key => this.filesMap.get(key)!)
return keys.map(key => this.filesMap.get(key)!).filter(Boolean)
return Array.from(this.filesMap.values())
}

Expand Down

0 comments on commit b054cd5

Please sign in to comment.