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

hermione

Package Overview
Dependencies
Maintainers
6
Versions
401
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hermione - npm Package Compare versions

Comparing version 0.10.0 to 0.11.0

4

CHANGELOG.md

@@ -0,1 +1,5 @@

## 0.11.0 - 2016-08-01
* Added capability to run tests matched by masks
## 0.10.0 - 2016-08-01

@@ -2,0 +6,0 @@

48

lib/path-utils.js
'use strict';
var q = require('q'),
fs = require('q-io/fs'),
_ = require('lodash');
const q = require('q');
const qfs = require('q-io/fs');
const _ = require('lodash');
const glob = require('glob');
function expandPath(path) {
return fs.stat(path)
.then(function(stat) {
if (!stat.isDirectory()) {
return [path];
}
return fs.listTree(path, function(path) {
return fs.extension(path) === '.js';
});
})
.catch(function(e) {
return [];
})
.then(function(paths) {
return paths.map(fs.absolute.bind(fs));
});
}
const getFilesByMask = (path) => q.denodeify(glob)(path);
exports.expandPaths = function expandPaths(paths) {
const listJsFiles = (path) => {
return qfs.listTree(path)
.then((paths) => paths.filter((path) => qfs.extension(path) === '.js'));
};
const expandPath = (path) => {
return qfs.stat(path)
.then((stat) => stat.isDirectory() ? listJsFiles(path) : [path])
.then((paths) => paths.map((path) => qfs.absolute(path)));
};
const processPaths = (paths, callback) => {
return _(paths)
.map(expandPath)
.map(callback)
.thru(q.all).value()
.then(_.flatten);
.then(_.flatten)
.then(_.uniq);
};
exports.expandPaths = (paths) => {
return processPaths(paths, getFilesByMask)
.then((matchedPaths) => processPaths(matchedPaths, expandPath));
};
{
"name": "hermione",
"version": "0.10.0",
"version": "0.11.0",
"description": "Tests framework based on mocha and wdio",

@@ -27,6 +27,6 @@ "main": "lib/hermione.js",

"dependencies": {
"qemitter": "^1.1.0",
"chalk": "^1.1.1",
"clear-require": "^1.0.1",
"commander": "^2.9.0",
"glob": "^7.0.5",
"inherit": "^2.2.2",

@@ -38,2 +38,3 @@ "lodash": "~3.10.1",

"q-promise-utils": "^1.0.0",
"qemitter": "^1.1.0",
"teamcity-service-messages": "^0.1.6",

@@ -40,0 +41,0 @@ "urijs": "^1.17.0",

@@ -290,2 +290,5 @@ Hermione

{
files: 'tests/desktop/*.hermione.js' // run tests matched with a mask
},
{
files: 'tests/touch', // run tests associated with this path in a browser with id `browser`

@@ -292,0 +295,0 @@ browsers: ['browser'] // which is configured in option `browsers`

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