Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Aviv Keller <telavivkeller@gmail.com>
  • Loading branch information
jasnell and RedYetiDev authored Sep 7, 2024
1 parent a1fc6ae commit 4db976a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/sequential/test-worker-arraybuffer-zerofill.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
'use strict';
require('../common');
const Countdown = require('../common/countdown');
const assert = require('assert');
const { Worker } = require('worker_threads');
const { describe, it, mock } = require('node:test');

describe('Allocating uninitialized ArrayBuffers ...', () => {
it('...should not affect zero-fill in other threads', () => {
it('...should not affect zero-fill in other threads', (t) => {
const w = new Worker(`
const { parentPort } = require('worker_threads');
Expand All @@ -32,11 +31,11 @@ describe('Allocating uninitialized ArrayBuffers ...', () => {

const countdown = new Countdown(100, () => {
w.terminate();
assert(fn.mock.calls.length > 0);
t.assert.ok(fn.mock.calls.length > 0);
});

w.on('message', (sum) => {
assert.strictEqual(sum, 0);
t.assert.strictEqual(sum, 0);
if (countdown.remaining) countdown.dec();
});
});
Expand Down

0 comments on commit 4db976a

Please sign in to comment.