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

nightwatch

Package Overview
Dependencies
Maintainers
1
Versions
360
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nightwatch - npm Package Compare versions

Comparing version 0.5.32 to 0.5.33

tests/sampletests/srcfolders/other_sample.js

2

examples/globalsModule.js

@@ -36,5 +36,5 @@ module.exports = {

reporter : function(results, cb) {
console.log(JSON.stringify(results, null, ' '));
//console.log(results);
cb();
}
};

@@ -153,2 +153,6 @@ var fs = require('fs');

if (results && results.errors) {
console.log(results.errmessages.join('\n'));
}
if (err) {

@@ -155,0 +159,0 @@ Logger.enable();

@@ -506,3 +506,3 @@ /**

runFiles(paths, function runTestModule(err, fullpaths) {
function runTestModule(err, fullpaths) {
var errorMessage = ['No tests defined! using source folder:', paths];

@@ -534,2 +534,7 @@

var moduleKey = path.join(subFolder, moduleName);
if (paths.length > 1) {
var parentFolder = moduleParts.pop();
moduleKey = parentFolder + path.sep + moduleKey;
}
globalResults.modules[moduleKey] = {};

@@ -613,2 +618,17 @@

});
}
// Accumulate various test paths under one or more src_folder paths, then run tests.
var foundPaths = [];
var joinedPaths = 0;
runFiles(paths, function (err, fullpaths) {
if (fullpaths && fullpaths.length > 0) {
foundPaths = foundPaths.concat(fullpaths);
}
joinedPaths++;
if (joinedPaths === paths.length) {
runTestModule(null, foundPaths);
}
}, opts);

@@ -615,0 +635,0 @@

{
"name": "nightwatch",
"description": "A node.js bindings implementation for selenium 2.0/webdriver",
"version": "0.5.32",
"version": "0.5.33",
"author": {

@@ -6,0 +6,0 @@ "name": "Andrei Rusu",

@@ -50,2 +50,51 @@ var BASE_PATH = process.env.NIGHTWATCH_COV

'test run multiple sources and same module name' : function(test) {
this.Runner.run([
path.join(process.cwd(), '/sampletests/simple'),
path.join(process.cwd(), '/sampletests/mixed')
], {
seleniumPort : 10195,
silent : true,
output : false,
globals : {
test : test
}
}, {
output_folder : false
}, function(err, results) {
test.equals(err, null);
test.ok('simple/sample' in results.modules);
test.ok('mixed/sample' in results.modules);
test.ok('demoTest' in results.modules['simple/sample']);
test.ok('demoTestMixed' in results.modules['mixed/sample']);
test.done();
});
},
testRunMultipleSrcFolders : function(test) {
test.expect(8);
var testsPath = path.join(process.cwd(), '/sampletests/simple');
var testsPath2 = path.join(process.cwd(), '/sampletests/srcfolders');
this.Runner.run([testsPath2, testsPath], {
seleniumPort : 10195,
silent : true,
output : false,
globals : {
test : test
}
}, {
output_folder : false
}, function(err, results) {
test.equals(err, null);
test.ok('simple/sample' in results.modules);
test.ok('demoTest' in results.modules['simple/sample']);
test.ok('srcfolders/other_sample' in results.modules);
test.ok('srcFoldersTest' in results.modules['srcfolders/other_sample']);
test.done();
});
},
testRunWithExcludeFolder : function(test) {

@@ -52,0 +101,0 @@ var testsPath = path.join(process.cwd(), '/sampletests/withexclude');

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