mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
test: do not use common.isMainThread
`common.isMainThread` was removed in https://github.com/nodejs/node/commit/8caa1dcee63b2c6fd7a9, use the `isMainThread` export of the `worker_threads` module instead. PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
1 parent
575251ae6a
commit
85f7bbf4e4
1 file changed
+2
-1
@@ -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');
|
||||
|
||||
Reference in new issue
Block a user