From 17921a95696e25313ed305d8d9c72496be80f299 Mon Sep 17 00:00:00 2001 From: Marvin Hagemeister Date: Sun, 13 Nov 2016 10:52:37 +0100 Subject: [PATCH] Fix binding tests leaking process values --- test/binding.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/binding.js b/test/binding.js index 590c20d5d..329f0d524 100644 --- a/test/binding.js +++ b/test/binding.js @@ -53,7 +53,9 @@ describe('binding', function() { }); afterEach(function() { - process.arch = prevValue; + Object.defineProperty(process, 'arch', { + value: prevValue, + }); }); it('should error', function() { @@ -83,7 +85,9 @@ describe('binding', function() { }); afterEach(function() { - process.platform = prevValue; + Object.defineProperty(process, 'platform', { + value: prevValue, + }); }); it('should error', function() { @@ -113,7 +117,9 @@ describe('binding', function() { }); afterEach(function() { - process.versions.modules = prevValue; + Object.defineProperty(process.versions, 'modules', { + value: prevValue, + }); }); it('should error', function() {