Skip to content

Commit

Permalink
chore: remove console.warn from ./scripts/bench-file script
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Nov 23, 2024
1 parent 4af296e commit e9c274b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions scripts/bench-file/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,19 @@ async function main() {
const rootDir = new URL('../../../', import.meta.url).pathname
const scriptDir = new URL('../', import.meta.url).pathname
const nodeModulesDir = path.join(rootDir, 'node_modules')
const vitestDir = path.join(nodeModulesDir, 'vitest')

// If the root node_modules directory doesn't contain vitest, link
// it to the vitest installed for this script.
fs.mkdirSync(nodeModulesDir, { recursive: true })
try {
if (!fs.existsSync(vitestDir)) {
fs.mkdirSync(nodeModulesDir, { recursive: true })
fs.symlinkSync(
path.relative(
nodeModulesDir,
path.join(scriptDir, 'node_modules/vitest'),
),
path.join(nodeModulesDir, 'vitest'),
vitestDir,
)
} catch (e) {
console.warn(e)
}

const vitest = await createVitest('benchmark', {
Expand Down

0 comments on commit e9c274b

Please sign in to comment.