Skip to content

Commit

Permalink
fixup! CLI: Introduce QUnit CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
Trent Willis committed Mar 18, 2017
1 parent 705fa22 commit 2ad27de
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
File renamed without changes.
9 changes: 3 additions & 6 deletions bin/utils.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
"use strict";

const walkSync = require( "walk-sync" );
const fs = require( "fs" );
const existsStat = require( "exists-stat" );

function getFilesFromArgs( args ) {
let globs = args.slice();

// Default to files in the test directory
if ( !globs.length ) {
globs.push( "test/*.js" );
}

// For each of the potential globs, we check if it is a directory path and
// update it so that it matches the JS files in that directory.
globs = globs.map( glob => {
let stat;

try {
stat = fs.statSync( glob );
} catch ( e ) {}
let stat = existsStat( glob );

if ( stat && stat.isDirectory() ) {
return `${glob}/*.js`;
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"license": "MIT",
"bin": {
"qunit": "bin/qunitjs"
"qunit": "bin/qunit"
},
"files": [
"bin/",
Expand All @@ -32,6 +32,7 @@
],
"dependencies": {
"commander": "2.9.0",
"exists-stat": "^1.0.0",
"js-reporters": "1.1.0",
"walk-sync": "0.3.1"
},
Expand Down

0 comments on commit 2ad27de

Please sign in to comment.