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
nodejs@8caa1dcee63b2c6fd7a9, use the
`isMainThread` export of the `worker_threads` module instead.

PR-URL: nodejs#56768
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
  • Loading branch information
lpinca authored Jan 26, 2025
1 parent 1c7c32f commit 80c70ee
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 80c70ee

Please sign in to comment.