New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

test-agent

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

test-agent - npm Package Compare versions

Comparing version 0.8.0 to 0.9.0

6

HISTORY.md

@@ -0,1 +1,7 @@

# 0.9.0
- MochaDriver now allows multiple test helpers.
# 0.8.0
- added support for mocha 1.7x
# 0.7.3

@@ -2,0 +8,0 @@ - fixed a bug where numerious extra sockets where opened.

35

lib/test-agent/browser-worker/mocha-driver.js

@@ -41,4 +41,12 @@ (function(window) {

/**
* location of test helper.
* location of test helper(s).
*
* Will be loaded before any of your tests.
* May pass more then one via an array.
*
* Each helper is loaded completely before
* requiring any other helpers allowing multiple
* files to be requested prior to executing tests.
*
* @type {String|Array}
*/

@@ -84,2 +92,25 @@ testHelperUrl: './test/helper.js',

_loadTestHelpers: function(box, callback) {
var helpers = this.testHelperUrl;
if (typeof(helpers) === 'string') {
helpers = [helpers];
}
var current = 0;
var max = helpers.length;
function next() {
if (current < max) {
box.require(helpers[current], function() {
current++;
next();
});
} else {
callback();
}
}
next();
},
_testRunner: function _testRunner(worker, tests, done) {

@@ -110,3 +141,3 @@ var box = worker.sandbox.getWindow(),

box.require(this.testHelperUrl, function(){
self._loadTestHelpers(box, function() {
tests.forEach(function(test) {

@@ -113,0 +144,0 @@ box.require(test);

2

package.json
{
"name": "test-agent",
"version": "0.8.0",
"version": "0.9.0",
"author": "James Lal",

@@ -5,0 +5,0 @@ "description": "execute client side tests from browser report back to cli",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc