From 4db976a3f949ef9f44eaaca97b6897c37ddaefd2 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Sat, 7 Sep 2024 13:00:56 -0700 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Aviv Keller --- test/sequential/test-worker-arraybuffer-zerofill.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/sequential/test-worker-arraybuffer-zerofill.js b/test/sequential/test-worker-arraybuffer-zerofill.js index b30f3e513c6ec6..43a4d94129e384 100644 --- a/test/sequential/test-worker-arraybuffer-zerofill.js +++ b/test/sequential/test-worker-arraybuffer-zerofill.js @@ -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'); @@ -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(); }); });