Skip to content

Commit

Permalink
Fixed pass "-u" without any other arguments for the test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
Anantachai Saothong (Manta) committed May 6, 2020
1 parent dd88aee commit bfbfcbb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ const Stylus = require('stylus')
const format = require('../edge/format')
const compareContent = require('../edge/compareContent')

const filesAndDirectories = _.chain(ps.argv.length > 2 ? ps.argv.slice(2) : ['*'])
const filesAndDirectories = _.chain(ps.argv.slice(2))
.reject(para => para.startsWith('-'))
.map(para => glob.sync('spec/' + para))
.flatten()
.thru(list => list.length > 0 ? list : ['*'])
.flatMap(para => glob.sync('spec/' + para))
.filter(directory => fs.lstatSync(directory).isDirectory() && fs.readdirSync(directory).length > 0)
.value()
const filesOnly = path => pt.extname(path) === '.js'
Expand Down

0 comments on commit bfbfcbb

Please sign in to comment.