Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jute

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jute - npm Package Compare versions

Comparing version 0.0.65 to 0.0.67

examples/output/toolbar/cover.json

1

jute_backend.js

@@ -77,3 +77,2 @@ #!/usr/bin/env node

// Get Party Started

@@ -80,0 +79,0 @@ eventHub.on('configureError', function(obj) {

@@ -36,3 +36,2 @@ /*

module.exports = {

@@ -42,4 +41,5 @@

// Javascript is single threaded! We don't have to worry about concurrency!
var path = require('path'),
find = require('npm/lib/utils/find');
var glob = require("glob")
, path = require('path')
;

@@ -49,7 +49,8 @@ hub.on('loadActions', loadActions);

function loadActions() {
find(path.join(__dirname, 'actions'), /\.js$/, function(err, actions) {
var base = path.join(__dirname, 'actions');
glob('*.js', { cwd: base }, function (err, actions) {
// Suck in all available actions
if (!err) {
actions.forEach(function(action) {
var act = require(action);
var act = require(path.join(base, action));
act.Create && act.Create(hub, common);

@@ -56,0 +57,0 @@ });

@@ -98,3 +98,3 @@ /*

// find all local tests
var find = require('npm/lib/utils/find'),
var glob = require('glob'),
prefix = hub.config.testDir,

@@ -114,5 +114,4 @@ local_test_files = hub.config.testRegex,

// ONLY USE HTML FOR NOW UNTIL THE PAGE IS SMARTER...
find(prefix, /.html?$/, function(err, matches_html) {
glob('**/*.html', { cwd: prefix }, function(err, matches_html) {
matches_html.forEach(function(testFile) {
testFile = testFile.replace(prefix, '');
data.push({ test_url: testFile });

@@ -119,0 +118,0 @@ });

@@ -160,5 +160,2 @@ /*

} else if (obj.phantomjs) {
if (!obj.screen) {
obj.screen = hub.config.screen;
}
if (obj.send_output) {

@@ -277,3 +274,3 @@ test_obj.sendOutput = 1;

seleniumIDs.forEach(function(selID) {
hub.emit('action:phantomjsStart', selID, obj.screen, req, res);
hub.emit('action:phantomjsStart', selID, req, res);
});

@@ -300,3 +297,2 @@ } else {

}
}

@@ -303,0 +299,0 @@ }

@@ -46,6 +46,7 @@ /*

// Events I care about
hub.addListener('action:phantomjsStart', startPhantomjs);
function startPhantomjs(selID, screen, req, res) {
function startPhantomjs(selID, req, res) {
var cb, phantom, body = req.body,

@@ -57,4 +58,3 @@ phantomjs = hub.config.phantomjs,

try {
hub.emit(hub.LOG, hub.INFO, "DISPLAY=:" + screen + ' ' + phantomjs + ' ' + path.join(__dirname, '..', "phantomJUTE.js") + ' ' + url);
process.env.DISPLAY = ':' + screen;
hub.emit(hub.LOG, hub.INFO, phantomjs + ' ' + path.join(__dirname, '..', "phantomJUTE.js") + ' ' + url);
phantom = child.spawn(phantomjs, [ path.join(__dirname, '..', "phantomJUTE.js"), url, hub.config.outputDir]);

@@ -98,3 +98,3 @@ phantom.stdout.on('data', function(data) {

phantom.done = true;
phantom.kill()
phantom.kill();
delete cache.connections[selID]; // done with status updates

@@ -106,4 +106,3 @@ hub.emit('action:phantomjsDone', err, selID);

}
};

@@ -84,3 +84,3 @@ /*

var testFiles, testResults = [], compDir,
find = require('npm/lib/utils/find'),
glob = require('glob'),
fs = require('fs'),

@@ -93,5 +93,5 @@ baseDir = hub.config.outputDir;

// Find all the various output files
find(compDir, /\.txt$/, function(err, debugFiles) {
find(compDir, /\.png$/, function(err, snapshotFiles) {
find(compDir, /\.xml$/, function(err, testFiles) {
glob('**/*.txt', { cwd: compDir }, function(err, debugFiles) {
glob('**/*.png', { cwd: compDir }, function(err, snapshotFiles) {
glob('**/*.xml', { cwd: compDir }, function(err, testFiles) {
// Determined if failed or not

@@ -101,6 +101,6 @@ if (!err) {

testFiles.forEach(function(testFile) {
if (common.failedTests(testFile)) {
testResults.push({ name: path.basename(testFile), failed: 1 });
if (common.failedTests(path.join(compDir, testFile))) {
testResults.push({ name: testFile, failed: 1 });
} else {
testResults.push({ name: path.basename(testFile), failed: 0 });
testResults.push({ name: testFile, failed: 0 });
}

@@ -115,4 +115,4 @@ });

ret.current_results[component].coverage = coverage;
ret.current_results[component].debugFiles = debugFiles.map(function(f) { return path.basename(f); });
ret.current_results[component].snapshotFiles = snapshotFiles.map(function(f) { return path.basename(f); });
ret.current_results[component].debugFiles = debugFiles.map(function(f) { return f; });
ret.current_results[component].snapshotFiles = snapshotFiles.map(function(f) { return f; });
} catch(e) {

@@ -119,0 +119,0 @@ hub.emit(hub.LOG, hub.ERROR, 'Error checking for coverage path: ' + e);

@@ -56,3 +56,2 @@ /*

inject: 1,
screen: 0,
phantomjs: '/usr/local/bin/phantomjs',

@@ -110,3 +109,8 @@ host: ''

config.testDirWeb = config.testDir;
config.testDir = path.join(config.docRoot, config.testDir);
if (!config.testDirWeb.match(/\/$/)) {
config.testDirWeb += '/';
}
config.testDir = path.join(config.docRoot, config.testDir);
try {

@@ -159,20 +163,20 @@ fs.statSync(config.testDir);

var testDir = path.join(config.outputDir, 'foo');
fs.mkdir(testDir, 0777, function(err) {
if (err) {
hub.emit(hub.LOG, hub.ERROR, "** Output directory '" + config.outputDir + "' not writable or does not exist!! **");
hub.emit(hub.LOG, hub.ERROR, "Note outputDir is RELATIVE to docRoot!!");
hub.emit(hub.LOG, hub.ERROR, "Change output dir using: % npm conifg set jute:outputDir <dir>");
hub.emit(hub.LOG, hub.ERROR, "Or make " + config.outputDir + ' writable by user/group running jute');
hub.emit('configureError', { name: 'outputDir', value: config.outputDir, error: err } );
return;
}
try {
fs.mkdirSync(testDir, 0777);
} catch(e) {
hub.emit(hub.LOG, hub.ERROR, "** Output directory '" + config.outputDir + "' not writable or does not exist!! **");
hub.emit(hub.LOG, hub.ERROR, "Note outputDir is RELATIVE to docRoot!!");
hub.emit(hub.LOG, hub.ERROR, "Change output dir using: % npm conifg set jute:outputDir <dir>");
hub.emit(hub.LOG, hub.ERROR, "Or make " + config.outputDir + ' writable by user/group running jute');
hub.emit('configureError', { name: 'outputDir', value: config.outputDir, error: e } );
return;
}
try {
fs.rmdirSync(testDir);
} catch(e) {}
try {
fs.rmdirSync(testDir);
} catch(e) {}
// All is cool - stash config & move on
hub.config = config;
hub.emit('configureDone', config);
});
// All is cool - stash config & move on
hub.config = config;
hub.emit('configureDone', config);
}

@@ -179,0 +183,0 @@ }

@@ -60,5 +60,5 @@ /**

} else {
waitFor(function(){}, function(){});
setInterval(function() {}, 200000);
}
});
{
"name": "jute",
"description": "Javascript Unit Test Environment",
"keywords": ["selenium", "test", "testing", "unit", "tests"],
"version": "0.0.65",
"keywords": [
"selenium",
"test",
"testing",
"unit",
"tests",
"jasmine",
"phantomjs"
],
"version": "0.0.67",
"author": "Mark Ethan Trostler <mark@zzo.com>",
"preferGlobal": true,
"bin" : {
"jute" : "./jute_backend.js",
"bin": {
"jute": "./jute_backend.js",
"jute_submit_test": "./submit_test.js",
"jute_v8": "./jute_v8.js",
"jute_jasmine": "./jute_jasmine.js"
"jute_v8": "./jute_v8.js",
"jute_jasmine": "./jute_jasmine.js"
},
"scripts" : {
"start" : "node ./jute/daemon.js --start",
"stop" : "node ./jute/daemon.js --stop",
"restart" : "node ./jute/daemon.js --restart"
"scripts": {
"start": "node ./jute/daemon.js --start",
"stop": "node ./jute/daemon.js --stop",
"restart": "node ./jute/daemon.js --restart"
},

@@ -24,24 +32,23 @@ "repository": {

"homepage": "https://github.com/zzo/JUTE",
"dependencies" :
{
"soda" : "~0.2"
, "node-uuid": "~1.2"
, "connect" : "~1.7"
, "npm" : "~1.0"
, "yui3": "~0.7"
, "jsdom": "~0.2"
, "htmlparser": "~1.7"
, "wordwrap": ""
, "xmlhttprequest" : "~1.2"
, "cookie-sessions" : "~0.0"
, "mime" : "~1.2"
, "optimist" : "~0.2"
, "webdriverjs" : ""
, "daemonize" : "~0.3"
, "jasmine-node" : "~1.0"
"dependencies": {
"soda": "~0.2",
"node-uuid": "~1.2",
"connect": "~1.7",
"yui3": "~0.7",
"jsdom": "~0.2",
"htmlparser": "~1.7",
"wordwrap": "",
"xmlhttprequest": "~1.2",
"cookie-sessions": "~0.0",
"mime": "~1.2",
"optimist": "~0.2",
"webdriverjs": "",
"daemonize": "~0.3",
"jasmine-node": "~1.0",
"glob": "~3.2.6"
},
"config" : {
"port" : "5883",
"docRoot": "/var/www/",
"testDir": "test/",
"config": {
"port": "5883",
"docRoot": "/var/www/",
"testDir": "test/",
"outputDir": "output/",

@@ -53,4 +60,6 @@ "java": "/usr/bin/java",

"testRegex": "*.htm*"
},
"devDependencies": {
"jshint": "~2.1.4"
}
}

@@ -44,3 +44,3 @@ #!/usr/bin/env node

args = opt
.usage('Usage: $0 --test [testfile] [ --test [another testfile] ] [ --host [JUTE host] ] [ --port [JUTE host port] ] [ --sel_host [Selenium host] ] [ --sel_browser [Selenium browser spec] ] [ --seleniums # ] [ --sel2 ] [ --load ] ] [ --send_output ] [ --wait ] [ --clear_results ] [ -v8 ] [ --jasmine] [ --coverage ] [ --status ] [ --snapshot ] [ --retry ] [ --phantomjs ] [ --screen # ]')
.usage('Usage: $0 --test [testfile] [ --test [another testfile] ] [ --host [JUTE host] ] [ --port [JUTE host port] ] [ --sel_host [Selenium host] ] [ --sel_browser [Selenium browser spec] ] [ --seleniums # ] [ --sel2 ] [ --load ] ] [ --send_output ] [ --wait ] [ --clear_results ] [ -v8 ] [ --jasmine] [ --coverage ] [ --status ] [ --snapshot ] [ --retry ] [ --phantomjs ]')
.alias('t', 'test')

@@ -59,3 +59,2 @@ .alias('h', 'host')

.alias('ph', 'phantomjs')
.alias('sc', 'screen')
.alias('s2', 'sel2')

@@ -77,3 +76,2 @@ .default('host', (config && config.host) || os.hostname())

.default('retry', 0)
.default('screen', 0)
.describe('test', 'Test file to run - relative to docRoot/testDir (npm set jute.testDir) - can specify multiple of these')

@@ -97,3 +95,2 @@ .describe('host', 'Hostname of JUTE server')

.describe('phantomjs', 'Path to phantomjs executable')
.describe('screen', 'X screen number where an X server is listening')
.argv,

@@ -210,3 +207,2 @@ util = require('util'),

juteArgs.phantomjs = 1;
juteArgs.screen = args.screen;
}

@@ -213,0 +209,0 @@

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