mirror of
https://github.com/Hopiu/webapi-eca.git
synced 2026-03-16 22:10:31 +00:00
16 lines
445 B
Bash
Executable file
16 lines
445 B
Bash
Executable file
#!/usr/bin/env node
|
|
process.chdir( __dirname );
|
|
var fs = require( 'fs' );
|
|
var path = require( 'path' );
|
|
var nodeunit = require( 'nodeunit' );
|
|
var args = process.argv.slice( 2 );
|
|
if( args[ 0 ] !== undefined ) {
|
|
var fl = path.resolve( args[ 0 ] );
|
|
if ( fs.existsSync( fl ) ) {
|
|
nodeunit.reporters.default.run( [ fl ] );
|
|
} else {
|
|
console.error( 'File not found!!' );
|
|
}
|
|
} else {
|
|
nodeunit.reporters.default.run( [ 'testing' ] );
|
|
}
|