From b186d752dae356614c8fafa3191f70e69f3837fa Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 6 Sep 2016 13:32:30 -0700 Subject: [PATCH] Add failing spec for restoring noAsar value --- spec/asar-spec.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/asar-spec.js b/spec/asar-spec.js index 7d7f36e2fc0a..ae3a0ac06499 100644 --- a/spec/asar-spec.js +++ b/spec/asar-spec.js @@ -744,6 +744,14 @@ describe('asar package', function () { fs.readdirSync(asar) }, /ENOTDIR/) }) + + it('is reset to its original value when execSync throws an error', function () { + process.noAsar = false + assert.throws(function () { + ChildProcess.execSync(path.join(__dirname, 'does-not-exist.txt')) + }) + assert.equal(process.noAsar, false) + }) }) })