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.16.0 to 0.17.0

17

lib/node/bin/test.js

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

reporterList,
mochaOptions,
client = new Client({

@@ -84,2 +85,4 @@ retry: true

var enableCoverage = argv.coverage || false;
client.url = argv.server;

@@ -100,3 +103,3 @@

client.mirrorServerEvents(['set test envs', 'error', 'test data', 'coverage data'], true);
if (argv['coverage']) {
if (enableCoverage) {
client.send('start coverages', {files: files});

@@ -108,10 +111,13 @@ } else {

client.use(Apps.MochaTestEvents, {
reporterClass: reporterClass
});
mochaOptions = {
reporterClass: reporterClass,
coverage: enableCoverage
};
if (argv['coverage']) {
if (enableCoverage) {
client.use(Apps.BlanketCoverEvents);
}
client.use(Apps.MochaTestEvents, mochaOptions);
if(argv['wait-for-event'] && argv['event-timeout']) {

@@ -124,3 +130,2 @@ client.use(Apps.EventOrTimeout, {

client.on('test runner end', function(runner){

@@ -127,0 +132,0 @@ var reporter = runner.getMochaReporter();

@@ -54,3 +54,3 @@ var debug = require('debug')('test-agent:event mirror'),

debug('asking to mirror: ' + data.events.join(', '));
debug('asking to mirror: ' + data.events.join(', '));

@@ -57,0 +57,0 @@ data.events.forEach(function eachEvent(event) {

@@ -168,2 +168,3 @@ (function(window) {

this.initDomEvents();
window.dispatchEvent(new CustomEvent('test-agent-list-done'));

@@ -170,0 +171,0 @@ },

@@ -18,3 +18,2 @@ (function() {

enhance: function enhance(server) {
this.server = server;
server.on('coverage data', this._onCoverageData.bind(this));

@@ -47,4 +46,4 @@

// Print title
console.info('\n\n ' + titleColor + '-- Blanket.js Test Coverage Result --' + originColor + '\n');
console.info(' ' + fileNameColor + 'File Name' + originColor +
console.info('\n' + titleColor + '-- Blanket.js Test Coverage Result --' + originColor + '\n');
console.info(fileNameColor + 'File Name' + originColor +
' - ' + stmtColor + 'Covered/Total Smts' + originColor +

@@ -56,3 +55,3 @@ ' - ' + percentageColor + 'Coverage (\%)\n' + originColor);

var filename = dataItem.filename,
formatPrefix = (filename === "Global Total" ? "\n " : " "),
formatPrefix = (filename === "Global Total" ? "\n" : " "),
seperator = ' - ';

@@ -59,0 +58,0 @@

@@ -81,3 +81,3 @@ (function() {

this.proxy = new Proxy(this.runner);
this.proxy = new Proxy(this.runner, { coverage: this.coverage });
this.envs = [];

@@ -84,0 +84,0 @@

@@ -73,5 +73,16 @@ (function() {

function RunnerStreamProxy(runner) {
var self = this;
function RunnerStreamProxy(runner, options) {
var self = this,
key;
if (typeof(options) === 'undefined') {
options = {};
}
for (key in options) {
if (options.hasOwnProperty(key)) {
this[key] = options[key];
}
}
Responder.apply(this, arguments);

@@ -81,2 +92,9 @@

// We ignore log if coverage is enabled
if (!this.coverage) {
this.on('log', function onLog(data) {
console.log.apply(console, data.messages);
});
}
this.on({

@@ -88,6 +106,2 @@

'log': function onLog(data) {
console.log.apply(console, data.messages);
},
'end': function onEnd(data) {

@@ -94,0 +108,0 @@ runner.emit('end', data);

{
"name": "test-agent",
"version": "0.16.0",
"version": "0.17.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

Sorry, the diff of this file is too big to display

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