Skip to content

Commit

Permalink
test: do not use common.isMainThread
Browse files Browse the repository at this point in the history
`common.isMainThread` was removed in
8caa1dcee63b2c6fd7a9, use the
`isMainThread` export of the `worker_threads` module instead.

PR-URL: #56768
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
  • Loading branch information
lpinca authored and aduh95 committed Feb 3, 2025
1 parent b572d74 commit 258c5e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/parallel/test-require-resolve-opts-paths-relative.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
const common = require('../common');
const assert = require('assert');
const fixtures = require('../common/fixtures');
const { isMainThread } = require('worker_threads');

if (!common.isMainThread)
if (!isMainThread)
common.skip('process.chdir is not available in Workers');

const subdir = fixtures.path('module-require', 'relative', 'subdir');
Expand Down

0 comments on commit 258c5e5

Please sign in to comment.