Browse Source

Add failing spec for restoring noAsar value

Kevin Sawicki 8 years ago
parent
commit
b186d752da
1 changed files with 8 additions and 0 deletions
  1. 8 0
      spec/asar-spec.js

+ 8 - 0
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)
+      })
     })
   })