From cf5d287d4a794de827ac0d3607a62271f3cc2889 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Fri, 6 Dec 2024 12:48:25 -0800 Subject: [PATCH] Check strict equality to nullish values. --- test/manage-rolodex.mjs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/manage-rolodex.mjs b/test/manage-rolodex.mjs index aab0690..43b684c 100644 --- a/test/manage-rolodex.mjs +++ b/test/manage-rolodex.mjs @@ -73,23 +73,23 @@ test('rolodex valid contact management', async () => { test('should return null for an unknown address', async () => { const rolodex = new Rolodex() await rolodex.add('JohnDoe', NANO_TEST_VECTORS.ADDRESS_0) - assert.equals(rolodex.getName(NANO_TEST_VECTORS.ADDRESS_1), null) - assert.notEqual(rolodex.getName(NANO_TEST_VECTORS.ADDRESS_1), undefined) + assert.ok(rolodex.getName(NANO_TEST_VECTORS.ADDRESS_1) === null) + assert.ok(rolodex.getName(NANO_TEST_VECTORS.ADDRESS_1) !== undefined) }) test('should return null for a blank address', async () => { const rolodex = new Rolodex() await rolodex.add('JohnDoe', NANO_TEST_VECTORS.ADDRESS_0) //@ts-expect-error - assert.equals(rolodex.getName(undefined), null) + assert.ok(rolodex.getName(undefined) === null) //@ts-expect-error - assert.notEqual(rolodex.getName(undefined), undefined) + assert.ok(rolodex.getName(undefined) !== undefined) //@ts-expect-error - assert.equals(rolodex.getName(null), null) + assert.ok(rolodex.getName(null) === null) //@ts-expect-error - assert.notEqual(rolodex.getName(null), undefined) - assert.equals(rolodex.getName(''), null) - assert.notEqual(rolodex.getName(''), undefined) + assert.ok(rolodex.getName(null) !== undefined) + assert.ok(rolodex.getName('') === null) + assert.ok(rolodex.getName('') !== undefined) }) }) -- 2.34.1