Skip to content

Commit 8f50d3f

Browse files
committed
break up big output test into two sets
otherwise this thing times out a lot
1 parent 0a93528 commit 8f50d3f

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

test/test-am.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
var runTests = require('./test.js')
2+
runTests('[a-m]*.js')

test/test-nz.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
var runTests = require('./test.js')
2+
runTests('[n-z]*.js')

test/test.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,17 @@ function regEsc (str) {
1111
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&')
1212
}
1313

14-
if (process.argv[2]) {
15-
var file = path.resolve(dir, process.argv[2])
16-
runTests(file)
17-
} else {
18-
glob.sync(dir + '*.js').forEach(runTests)
14+
if (module === require.main) {
15+
if (process.argv[2]) {
16+
var file = path.resolve(dir, process.argv[2])
17+
runTests(file)
18+
} else {
19+
t.pass('just a common file')
20+
}
21+
}
22+
23+
module.exports = function (pattern) {
24+
glob.sync(dir + pattern).forEach(runTests)
1925
}
2026

2127
function runTests (file) {

0 commit comments

Comments
 (0)