From f0b702555aacc814da28a018277d56e5f79f10d1 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Thu, 20 Apr 2017 15:23:05 -0700 Subject: errors: use lazy assert to avoid issues on startup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use of assert must be lazy to allow errors to be used early before the process is completely set up PR-URL: https://github.com/nodejs/node/pull/11300 Ref: https://github.com/nodejs/node/issues/11273 Reviewed-By: Michaƫl Zasso Reviewed-By: Michael Dawson --- test/parallel/test-internal-errors.js | 6 ------ 1 file changed, 6 deletions(-) (limited to 'test/parallel/test-internal-errors.js') diff --git a/test/parallel/test-internal-errors.js b/test/parallel/test-internal-errors.js index dd4f02c1f7..4157ca0008 100644 --- a/test/parallel/test-internal-errors.js +++ b/test/parallel/test-internal-errors.js @@ -125,12 +125,6 @@ assert.throws(() => { message: /^Error for testing 2/ })); }, /AssertionError: .+ does not match \S/); -assert.doesNotThrow(() => errors.E('TEST_ERROR_USED_SYMBOL')); -assert.throws( - () => errors.E('TEST_ERROR_USED_SYMBOL'), - /^AssertionError: Error symbol: TEST_ERROR_USED_SYMBOL was already used\.$/ -); - // // Test ERR_INVALID_ARG_TYPE assert.strictEqual(errors.message('ERR_INVALID_ARG_TYPE', ['a', 'b']), 'The "a" argument must be of type b'); -- cgit v1.2.3