From d3e5603314631ed9908b3a2aefa2d7e34fed1e10 Mon Sep 17 00:00:00 2001 From: ZYSzys <17367077526@163.com> Date: Fri, 7 Sep 2018 10:47:15 +0800 Subject: [PATCH] test: test undefined in util --- test/parallel/test-util.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/parallel/test-util.js b/test/parallel/test-util.js index 337cb789f73656..2f91417d106148 100644 --- a/test/parallel/test-util.js +++ b/test/parallel/test-util.js @@ -113,14 +113,17 @@ assert.strictEqual(util.isBoolean(false), true); assert.strictEqual(util.isBoolean('string'), false); assert.strictEqual(util.isNull(null), true); +assert.strictEqual(util.isNull(undefined), false); assert.strictEqual(util.isNull(), false); assert.strictEqual(util.isNull('string'), false); +assert.strictEqual(util.isUndefined(undefined), true); assert.strictEqual(util.isUndefined(), true); assert.strictEqual(util.isUndefined(null), false); assert.strictEqual(util.isUndefined('string'), false); assert.strictEqual(util.isNullOrUndefined(null), true); +assert.strictEqual(util.isNullOrUndefined(undefined), true); assert.strictEqual(util.isNullOrUndefined(), true); assert.strictEqual(util.isNullOrUndefined('string'), false);