Skip to content

Commit

Permalink
chore: check for name in the package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Apr 25, 2024
1 parent 863a637 commit 5126275
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vitest/src/node/plugins/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function WorkspaceVitestPlugin(project: WorkspaceProject, options: Worksp
const pkgJsonPath = resolve(dir, 'package.json')
if (existsSync(pkgJsonPath))
name = JSON.parse(readFileSync(pkgJsonPath, 'utf-8')).name
else
if (typeof name !== 'string' || !name)
name = basename(dir)
}
else {
Expand Down

0 comments on commit 5126275

Please sign in to comment.