Skip to content

Commit

Permalink
fix: avoid ESLint error
Browse files Browse the repository at this point in the history
  • Loading branch information
robertrossmann committed Apr 8, 2021
1 parent 9db145b commit 419ea62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import type { RootHookObject } from 'mocha'

const session = new inspector.Session()
const procname = process.argv0
const pkgname = readpkg.sync()?.packageJson.name || null
const pkgname = readpkg.sync()?.packageJson.name
const pid = process.pid
const filename = `${pkgname ?? procname}.${pid}.cpuprofile`
const filename = `${pkgname?.length ? pkgname : procname}.${pid}.cpuprofile`
const destination = path.resolve(process.cwd(), filename)

const mochaHooks: RootHookObject = {
Expand Down

0 comments on commit 419ea62

Please sign in to comment.