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

antr

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

antr - npm Package Compare versions

Comparing version 0.1.4 to 0.2.0

CHANGELOG.md

4

lib/Runner.js

@@ -22,3 +22,4 @@ var async = require('async');

progressBar: (options.progressBar == false) ? false : true,
succinct: (options.succinct == true) ? true : false
succinct: (options.succinct == true) ? true : false,
sort: options.sort
}

@@ -131,2 +132,3 @@ this._stats = {

if( self._options.listFiles ) console.log('Files going to be run: ', files);
if( self._options.sort ) files = files.sort(self._options.sort);
cb(null, files);

@@ -133,0 +135,0 @@ });

@@ -9,3 +9,3 @@ {

],
"version": "0.1.4",
"version": "0.2.0",
"dependencies": {

@@ -12,0 +12,0 @@ "async": "0.2.9",

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

#antr
# antr

@@ -7,9 +7,12 @@ Asynchronous Node Test Runner

##Why?
## Why?
We had the need for a runner which runs tests asynchronously.
##Install
## Install
npm install antr
##Usage
## Usage
Just require the module and you're away!

@@ -35,3 +38,4 @@

####Stats contains
#### Stats contains
* **passed**

@@ -48,5 +52,7 @@ * **failed**

#### Required
* **filter** Regex to filter files to run
#### Optional
* **dirname** Directory to find files in - defaults to `.` *This can be an array of directories*

@@ -58,8 +64,7 @@ * **listFiles** Print out the array of files which will be run - defaults to `false`

* **succinct** Option to limit the amount of output on stdout/stderr - defaults to `false`
* **sort** Sort function (to behave like a `[].sort` compareFunction), in case you need to customise the order in which the discovered tests are run.
## npm Maintainers
* [Joe Warren](http://www.github.com/joewarren)
* [Jack Cannon](http://www.github.com/jackcannon)
## License
antr is licensed under the MIT license.

@@ -21,3 +21,3 @@ var Runner = require('../../lib/Runner.js');

item: 'testFail.js'
}
};
runner.updateStats(data);

@@ -34,3 +34,3 @@

assert.deepEqual(files, testFiles);
})
});

@@ -44,3 +44,3 @@ runner._options.dirname = 'test/files'; // Change to using a non array of directories

assert.deepEqual(files, testFiles);
})
});

@@ -54,2 +54,26 @@ // Do the assertions!

})();
})();
(function() {
var runner = new Runner({
dirname: ['test/files', 'test/sorting'],
filter: /run([^\/w]+?)\.js$/,
sort: function(leftPath, rightPath) {
var leftFilename = leftPath.split('/').slice(-1)[0];
var rightFilename = rightPath.split('/').slice(-1)[0];
return (leftFilename > rightFilename) ? 1 : -1;
}
});
runner.getFiles(function(err, files){
var expectedPaths = [
'test/sorting/runAlpha.js',
'test/sorting/runBeta.js',
'test/files/runMe.js',
'test/sorting/runZeta.js'
];
assert.deepEqual(files, expectedPaths);
});
})();
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