From 37acd806be0d91a27e2b8284df926f6e494ee011 Mon Sep 17 00:00:00 2001 From: Emily Ford Date: Fri, 6 Oct 2017 10:41:04 -0700 Subject: [PATCH] test: remove template literal Backport-PR-URL: https://github.com/nodejs/node/pull/19447 PR-URL: https://github.com/nodejs/node/pull/15953 Reviewed-By: Ruben Bridgewater --- test/addons-napi/test_error/test.js | 32 +++++++++-------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/test/addons-napi/test_error/test.js b/test/addons-napi/test_error/test.js index 80f99f48ba79f3..245e734e7503f0 100644 --- a/test/addons-napi/test_error/test.js +++ b/test/addons-napi/test_error/test.js @@ -15,46 +15,34 @@ class MyError extends Error { } const myError = new MyError('Some MyError'); // Test that native error object is correctly classed -assert.strictEqual(test_error.checkError(theError), true, - 'Error object correctly classed by napi_is_error'); +assert.strictEqual(test_error.checkError(theError), true); // Test that native type error object is correctly classed -assert.strictEqual(test_error.checkError(theTypeError), true, - 'Type error object correctly classed by napi_is_error'); +assert.strictEqual(test_error.checkError(theTypeError), true); // Test that native syntax error object is correctly classed -assert.strictEqual(test_error.checkError(theSyntaxError), true, - 'Syntax error object correctly classed by napi_is_error'); +assert.strictEqual(test_error.checkError(theSyntaxError), true); // Test that native range error object is correctly classed -assert.strictEqual(test_error.checkError(theRangeError), true, - 'Range error object correctly classed by napi_is_error'); +assert.strictEqual(test_error.checkError(theRangeError), true); // Test that native reference error object is correctly classed -assert.strictEqual(test_error.checkError(theReferenceError), true, - 'Reference error object correctly classed by' + - ' napi_is_error'); +assert.strictEqual(test_error.checkError(theReferenceError), true); // Test that native URI error object is correctly classed -assert.strictEqual(test_error.checkError(theURIError), true, - 'URI error object correctly classed by napi_is_error'); +assert.strictEqual(test_error.checkError(theURIError), true); // Test that native eval error object is correctly classed -assert.strictEqual(test_error.checkError(theEvalError), true, - 'Eval error object correctly classed by napi_is_error'); +assert.strictEqual(test_error.checkError(theEvalError), true); // Test that class derived from native error is correctly classed -assert.strictEqual(test_error.checkError(myError), true, - 'Class derived from native error correctly classed by' + - ' napi_is_error'); +assert.strictEqual(test_error.checkError(myError), true); // Test that non-error object is correctly classed -assert.strictEqual(test_error.checkError({}), false, - 'Non-error object correctly classed by napi_is_error'); +assert.strictEqual(test_error.checkError({}), false); // Test that non-error primitive is correctly classed -assert.strictEqual(test_error.checkError('non-object'), false, - 'Non-error primitive correctly classed by napi_is_error'); +assert.strictEqual(test_error.checkError('non-object'), false); assert.throws(() => { test_error.throwExistingError();