From 73fb06d097b4b632a19a6bcb4607f344030a7c01 Mon Sep 17 00:00:00 2001 From: "rakshith_bellare@outlook.com" Date: Fri, 4 May 2018 09:02:02 +0530 Subject: [PATCH 1/4] test, module: current directory gets priority for local module lookup --- test/parallel/test-module-relative-lookup.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-module-relative-lookup.js b/test/parallel/test-module-relative-lookup.js index 6ebb8ee1881962..a3c27695899bba 100644 --- a/test/parallel/test-module-relative-lookup.js +++ b/test/parallel/test-module-relative-lookup.js @@ -6,10 +6,10 @@ const _module = require('module'); // avoid collision with global.module const lookupResults = _module._resolveLookupPaths('./lodash'); let paths = lookupResults[1]; -assert.strictEqual(paths[0], '.', - 'Current directory gets highest priority for local modules'); +// Current directory gets highest priority for local modules +assert.strictEqual(paths[0], '.'); paths = _module._resolveLookupPaths('./lodash', null, true); -assert.strictEqual(paths && paths[0], '.', - 'Current directory gets highest priority for local modules'); +// Current directory gets highest priority for local modules +assert.strictEqual(paths && paths[0], '.'); From a9a236cd6cca2db1bb7e137b5452d9e1217ef0eb Mon Sep 17 00:00:00 2001 From: "rakshith_bellare@outlook.com" Date: Sat, 5 May 2018 23:30:00 +0530 Subject: [PATCH 2/4] test: removal of extra space in comment --- test/parallel/test-module-relative-lookup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-module-relative-lookup.js b/test/parallel/test-module-relative-lookup.js index a3c27695899bba..3e1904dc14fa61 100644 --- a/test/parallel/test-module-relative-lookup.js +++ b/test/parallel/test-module-relative-lookup.js @@ -6,10 +6,10 @@ const _module = require('module'); // avoid collision with global.module const lookupResults = _module._resolveLookupPaths('./lodash'); let paths = lookupResults[1]; -// Current directory gets highest priority for local modules +// Current directory gets highest priority for local modules assert.strictEqual(paths[0], '.'); paths = _module._resolveLookupPaths('./lodash', null, true); -// Current directory gets highest priority for local modules +// Current directory gets highest priority for local modules assert.strictEqual(paths && paths[0], '.'); From bb48bb8e9356465abdc82ba8e2b99a40477bfc94 Mon Sep 17 00:00:00 2001 From: "rakshith_bellare@outlook.com" Date: Sun, 6 May 2018 19:42:50 +0530 Subject: [PATCH 3/4] test: display values in AssertionErrors In test-module-relative-lookup, change assert.strictEqual() calls so that values are displayed when an AssertionError occurs. --- test/parallel/test-module-relative-lookup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-module-relative-lookup.js b/test/parallel/test-module-relative-lookup.js index a3c27695899bba..3e1904dc14fa61 100644 --- a/test/parallel/test-module-relative-lookup.js +++ b/test/parallel/test-module-relative-lookup.js @@ -6,10 +6,10 @@ const _module = require('module'); // avoid collision with global.module const lookupResults = _module._resolveLookupPaths('./lodash'); let paths = lookupResults[1]; -// Current directory gets highest priority for local modules +// Current directory gets highest priority for local modules assert.strictEqual(paths[0], '.'); paths = _module._resolveLookupPaths('./lodash', null, true); -// Current directory gets highest priority for local modules +// Current directory gets highest priority for local modules assert.strictEqual(paths && paths[0], '.'); From 3fb4a9e4788a16bca4cb77da90dc604fbb5a1a92 Mon Sep 17 00:00:00 2001 From: RakshithNM Date: Sun, 6 May 2018 19:42:50 +0530 Subject: [PATCH 4/4] test: display values in AssertionErrors In test-module-relative-lookup, change assert.strictEqual() calls so that values are displayed when an AssertionError occurs. --- test/parallel/test-module-relative-lookup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-module-relative-lookup.js b/test/parallel/test-module-relative-lookup.js index a3c27695899bba..3e1904dc14fa61 100644 --- a/test/parallel/test-module-relative-lookup.js +++ b/test/parallel/test-module-relative-lookup.js @@ -6,10 +6,10 @@ const _module = require('module'); // avoid collision with global.module const lookupResults = _module._resolveLookupPaths('./lodash'); let paths = lookupResults[1]; -// Current directory gets highest priority for local modules +// Current directory gets highest priority for local modules assert.strictEqual(paths[0], '.'); paths = _module._resolveLookupPaths('./lodash', null, true); -// Current directory gets highest priority for local modules +// Current directory gets highest priority for local modules assert.strictEqual(paths && paths[0], '.');