From 232bff4e9cecadb0451c3b013a6985519c905431 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 10 Feb 2022 21:44:41 -0800 Subject: [PATCH] [Test] fix incorrect `require.resolve` paths logic; enable these tests --- test/resolver_sync.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/resolver_sync.js b/test/resolver_sync.js index 6e4ae1e..407f7c8 100644 --- a/test/resolver_sync.js +++ b/test/resolver_sync.js @@ -6,7 +6,7 @@ var resolve = require('../'); var sync = require('../sync'); var requireResolveSupportsPaths = require.resolve.length > 1 - && (/^12\.[012]\./).test(process.version); // broken in v12.0-12.2, see https://github.com/nodejs/node/issues/27794 + && !(/^12\.[012]\./).test(process.version); // broken in v12.0-12.2, see https://github.com/nodejs/node/issues/27794 test('`./sync` entry point', function (t) { t.equal(resolve.sync, sync, '`./sync` entry point is the same as `.sync` on `main`');