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
6
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.26.1 to 0.26.2

15

lib/node/bin/server.js

@@ -34,8 +34,14 @@ var server = new (require('../websocket-server')),

option('coverage-thresholds', {
option('coverage-threshold', {
alias: 't',
desc: "Array of paths to coverage thresholds files",
default: './metadata.json'
desc: "Path to coverage threshold file"
}).
option('coverage-module-pattern', {
alias: 'm',
desc: 'A regular expression pattern for matching module name in appURL. \
The appURL will be http://app.gaiamobile.org:8080/...',
default: /([\S]+)/
}).
option('growl', {

@@ -102,3 +108,4 @@ desc: "Enables growl notifications for server"

use(Enhancements.BlanketConsoleReporter, {
paths: argv['coverage-thresholds'].split(' ')
path: argv['coverage-threshold'],
pattern: argv['coverage-module-pattern']
});

@@ -105,0 +112,0 @@

@@ -54,7 +54,12 @@ var Client = require('../../node/client'),

}).
option('coverage-thresholds', {
option('coverage-threshold', {
alias: 't',
desc: "Array of paths to coverage thresholds files",
default: './metadata.json'
desc: 'Path to coverage threshold file'
}).
option('coverage-module-pattern', {
alias: 'm',
desc: 'A regular expression pattern for matching module name in appURL. \
The appURL will be http://app.gaiamobile.org:8080/...',
default: /([\S]+)/
}).
option('server', {

@@ -137,3 +142,4 @@ desc: 'Location of the websocket server to connect to.',

client.use(Apps.BlanketConsoleReporter, {
paths: argv['coverage-thresholds'].split(' ')
path: argv['coverage-threshold'],
pattern: argv['coverage-module-pattern']
});

@@ -140,0 +146,0 @@ }

@@ -1,3 +0,2 @@

var fs = require('fs');
var pathUtils = require('path');
var path = require('path');

@@ -79,3 +78,3 @@ function BlanketConsoleReporter(options) {

_printConsoleFormat: function _printConsoleFormat(coverResults) {
var appName = coverResults[0].filename.match(/[A-Za-z0-9_-]+/gi)[1],
var appName = coverResults[0].filename.match(this.pattern)[1],
titleColor = '\u001b[1;36m',

@@ -160,25 +159,8 @@ fileNameColor = '\u001b[0;37m',

setupThresholds: function setupThresholds() {
var paths = this.paths;
this.thresholds = {};
if (paths) {
paths.forEach(function(path) {
var meatadata,
APP_NAME = /.*\/gaia\/(?:apps|dev_apps)\/(.*)/g,
appName;
try {
appName = APP_NAME.exec(path)[1];
meatadata = fs.readFileSync(pathUtils.join(path, 'metadata.json'),
{ encoding: 'utf8' }
);
meatadata = JSON.parse(meatadata);
this.thresholds[appName] = meatadata['coverage-threshold'] || 0;
}
catch (err) {
this.thresholds[appName] = 0;
}
}, this);
try {
this.thresholds = require(path.join(process.cwd(), this.path));
}
catch (err) {
throw err;
}
},

@@ -185,0 +167,0 @@

{
"name": "test-agent",
"version": "0.26.1",
"version": "0.26.2",
"author": "James Lal",

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

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