test: remove duplicate common imports

Signed-off-by: LiviaMedeiros <livia@cirno.name>
PR-URL: https://github.com/nodejs/node/pull/67088
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
This commit is contained in:
Livia Medeiros authored and Antoine du Hamel committed 2026-11-11 17:20:21 +01:00
1 parent bdbe9862ba
commit 569ef753f4
7 files changed
+5 -12

No files matched your search

-1
View File
@@ -1,6 +1,5 @@
'use strict';
require('../common');
const common = require('../common');
const dns = require('dns');
const dnsPromises = dns.promises;
@@ -20,7 +20,6 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.
'use strict';
require('../common');
const common = require('../common');
const assert = require('assert');
const dgram = require('dgram');
@@ -1,5 +1,4 @@
'use strict';
require('../common');
const common = require('../common');
const fixtures = require('../common/fixtures');
const assert = require('assert');
+2 -3
View File
@@ -1,10 +1,9 @@
import { spawnPromisified } from '../common/index.mjs';
import { mustCall, spawnPromisified } from '../common/index.mjs';
import * as fixtures from '../common/fixtures.mjs';
import assert from 'node:assert';
import { execPath } from 'node:process';
import { describe, it } from 'node:test';
import { isInternalThread, Worker } from 'node:worker_threads';
import * as common from '../common/index.mjs';
describe('worker_threads.isInternalThread', { concurrency: !process.env.TEST_PARALLEL }, () => {
it('should be true inside the loader thread', async () => {
@@ -29,7 +28,7 @@ describe('worker_threads.isInternalThread', { concurrency: !process.env.TEST_PAR
it('should be false inside a regular worker thread', async () => {
const worker = new Worker(fixtures.path('worker-is-internal-thread.js'));
worker.on('message', common.mustCall((message) => {
worker.on('message', mustCall((message) => {
assert.strictEqual(message, 'isInternalThread: false');
}));
});
@@ -1,8 +1,7 @@
'use strict';
require('../common');
const common = require('../common');
const { Readable } = require('stream');
const assert = require('assert');
const common = require('../common');
let count = 0;
@@ -1,8 +1,7 @@
'use strict';
require('../common');
const common = require('../common');
const { Readable } = require('stream');
const assert = require('assert');
const common = require('../common');
{
const r = Readable.from([]);
// Cancelling reader while closing should not cause uncaught exceptions
@@ -1,9 +1,8 @@
'use strict';
require('../common');
const { mustCall } = require('../common');
const assert = require('assert');
const { markAsUncloneable } = require('node:worker_threads');
const { mustCall } = require('../common');
const expectedErrorName = 'DataCloneError';