mirror of
https://github.com/oven-sh/bun
synced 2026-02-15 05:12:29 +00:00
Sync already-added tests with Node
This commit is contained in:
@@ -19,7 +19,7 @@ const { Worker } = require('worker_threads');
|
||||
`, { eval: true });
|
||||
w.on('message', common.mustCall(() => {
|
||||
assert.strictEqual(local.toString(), 'Hello world!');
|
||||
global.gc();
|
||||
globalThis.gc();
|
||||
w.terminate();
|
||||
}));
|
||||
w.postMessage({ sharedArrayBuffer });
|
||||
|
||||
@@ -8,7 +8,7 @@ for (const fn of ['setTimeout', 'setImmediate', 'setInterval']) {
|
||||
const worker = new Worker(`
|
||||
const { parentPort } = require('worker_threads');
|
||||
${fn}(() => {
|
||||
parentPort.postMessage({});
|
||||
require('worker_threads').parentPort.postMessage({});
|
||||
while (true);
|
||||
});`, { eval: true });
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ const { Worker } = require('worker_threads');
|
||||
});
|
||||
w.on('message', common.mustCall(() => {
|
||||
assert.strictEqual(local.toString(), 'Hello world!');
|
||||
global.gc();
|
||||
globalThis.gc();
|
||||
w.terminate();
|
||||
}));
|
||||
w.postMessage({});
|
||||
|
||||
Reference in New Issue
Block a user