From f5c655a58300f0899a0f5de130bff6e9dcf3de81 Mon Sep 17 00:00:00 2001 From: Johannes Ewald Date: Sun, 19 Dec 2021 01:54:32 +0100 Subject: [PATCH] Add test case for re-assigning consts --- testLib/sharedTestCases.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/testLib/sharedTestCases.js b/testLib/sharedTestCases.js index c2d7c5e..f8af815 100644 --- a/testLib/sharedTestCases.js +++ b/testLib/sharedTestCases.js @@ -422,4 +422,12 @@ module.exports = function () { expect(typeof shebangs).to.be("function"); expect(shebangModule.shebangs()).to.be(true); }); + + it("should be possible to re-assign consts", function () { + var test = rewire("./constModule.js"); + + test.__set__("j", "some other value"); + + expect(test.j()).to.be("some other value"); + }); };