Skip to content

Commit

Permalink
Add test case for re-assigning consts
Browse files Browse the repository at this point in the history
  • Loading branch information
jhnns committed Dec 19, 2021
1 parent 9e7f846 commit f5c655a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions testLib/sharedTestCases.js
Expand Up @@ -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");
});
};

0 comments on commit f5c655a

Please sign in to comment.