From fd5bb6b201451e757fbe4a96bfb4032b9413a434 Mon Sep 17 00:00:00 2001 From: hiroki osame Date: Wed, 5 Apr 2023 03:31:58 -0400 Subject: fix: modules to have null prototype (#2561) --- test/js/node/path/path.test.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/js/node/path/path.test.js') diff --git a/test/js/node/path/path.test.js b/test/js/node/path/path.test.js index ad5688ea7..ce41ca10f 100644 --- a/test/js/node/path/path.test.js +++ b/test/js/node/path/path.test.js @@ -9,6 +9,10 @@ const strictEqual = (...args) => { expect(true).toBe(true); }; +it('should not inherit Object.prototype', () => { + expect(path).not.toHaveProperty('toString'); +}); + it("path.basename", () => { strictEqual(path.basename(file), "path.test.js"); strictEqual(path.basename(file, ".js"), "path.test"); -- cgit v1.2.3