mirror of
https://github.com/flynx/test.js.git
synced 2025-10-28 10:20:09 +00:00
added ignore paths...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
f5cebf4c43
commit
a207c74e98
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ig-test",
|
||||
"version": "1.2.3",
|
||||
"version": "1.3.0",
|
||||
"description": "experimental test runner....",
|
||||
"main": "test.js",
|
||||
"bin": {
|
||||
@ -27,6 +27,6 @@
|
||||
"colors": "^1.4.0",
|
||||
"glob": "^7.1.6",
|
||||
"ig-argv": "^2.13.0",
|
||||
"ig-object": "^5.2.2"
|
||||
"ig-object": "^5.2.6"
|
||||
}
|
||||
}
|
||||
|
||||
19
test.js
19
test.js
@ -27,7 +27,9 @@ var argv = require('ig-argv')
|
||||
// | <path>
|
||||
// | [ <path>, .. ]
|
||||
//
|
||||
// XXX need to skip ./node_modules...
|
||||
module.DEFAULT_TEST_FILES = '**/?(*-)test.js'
|
||||
module.IGNORE_TEST_FILES = ['node_modules/**']
|
||||
|
||||
|
||||
// NOTE: to test in verbose mode do:
|
||||
@ -519,7 +521,10 @@ argv.Parser({
|
||||
.forEach(function(path){
|
||||
;(path.includes('*') ?
|
||||
// search...
|
||||
glob.sync(path, {})
|
||||
glob.sync(path, {
|
||||
ignore: this.ignore_files
|
||||
|| module.IGNORE_TEST_FILES,
|
||||
})
|
||||
: [path])
|
||||
// load the modules...
|
||||
.forEach(function(path){
|
||||
@ -532,6 +537,18 @@ argv.Parser({
|
||||
require('./' + path.slice(0, -3)) }) }) }},
|
||||
|
||||
|
||||
ignore_files: undefined,
|
||||
|
||||
'-i': '-ignore',
|
||||
'-ignore': {
|
||||
doc: 'path/pattern to ignore in test file search',
|
||||
arg: 'PATH | ignore_files',
|
||||
collect: 'list',
|
||||
default: function(){
|
||||
return this.ignore_files
|
||||
|| module.IGNORE_TEST_FILES } },
|
||||
|
||||
|
||||
'-verbose': {
|
||||
doc: 'verbose mode',
|
||||
env: 'VERBOSE',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user