Comparing version 0.5.1 to 0.5.2
{ | ||
"name": "v8-debug", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "v8 debugger extending API", | ||
@@ -5,0 +5,0 @@ "homepage": "http://github.com/node-inspector/v8-debug", |
@@ -8,13 +8,27 @@ var expect = require('chai').expect; | ||
describe('binding', function() { | ||
var binding; | ||
var binding = require(binding_path); | ||
it('source was builded and can be accessed from script', function() { | ||
binding = require(binding_path); | ||
expect(binding).to.be.instanceof(Object); | ||
}); | ||
describe('core', function() { | ||
describe('function `call`', function() { | ||
it('should rethrow ReferenceError', function() { | ||
expect(binding.call.bind(null, function() { | ||
"use strict"; | ||
if (error_here) return; | ||
})).to.throw(ReferenceError); | ||
}); | ||
it('should rethrow SyntaxError', function() { | ||
expect(binding.call.bind(null, function() { | ||
eval('['); | ||
})).to.throw(SyntaxError); | ||
}); | ||
}); | ||
}); | ||
describe('InjectedScriptHost', function() { | ||
var host; | ||
before(function() { | ||
host = binding.InjectedScriptHost; | ||
}); | ||
var host = binding.InjectedScriptHost; | ||
describe('function `subtype`', function() { | ||
@@ -119,3 +133,3 @@ checksTypeValid(new Array(), 'array'); | ||
it('should throw on wrong expression', function() { | ||
expect(host.eval.bind(null, "[1")).to.throw(); | ||
expect(host.eval.bind(null, "[1")).to.throw(SyntaxError); | ||
}); | ||
@@ -153,4 +167,11 @@ }); | ||
}); | ||
it('should rethrow ReferenceError', function() { | ||
expect(host.callFunction.bind(null, function() { | ||
'use strict'; | ||
if (error_here) return; | ||
}, this)).to.throw(ReferenceError); | ||
}); | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
119325
2612
4