From 0b6d85afd68a0ac03d0ed53078ed19f1cee01058 Mon Sep 17 00:00:00 2001 From: Johannes Ewald Date: Sun, 19 Dec 2021 00:53:18 +0100 Subject: [PATCH] Re-add test case for globals --- testLib/sharedTestCases.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/testLib/sharedTestCases.js b/testLib/sharedTestCases.js index 41acf31..c2d7c5e 100644 --- a/testLib/sharedTestCases.js +++ b/testLib/sharedTestCases.js @@ -177,11 +177,7 @@ module.exports = function () { expect(someOtherModule.fs).not.to.be(mockedFs); }); - // This test fails on modern Node versions since they started to configure some - // global variables to be non-enumerable. This means that rewire() does in fact - // modify the global console object in newer Node versions. - // There is a work in progress fix at https://github.com/jhnns/rewire/tree/fix-globals - it.skip("should provide the ability to mock global objects just within the module", function () { + it("should provide the ability to mock global objects just within the module", function () { var rewiredModuleA = rewire("./moduleA.js"), rewiredModuleB = rewire("./moduleB.js"), consoleMock = {},