Allow tests to be restricted from the command line

This commit is contained in:
Andrew Miner
2015-04-07 19:19:56 -07:00
parent b9e4fd15f4
commit 2ba4dca95b
+11 -1
View File
@@ -6,6 +6,7 @@
### ###
fs = require 'fs' fs = require 'fs'
util = require 'util'
######################################################################################################################## ########################################################################################################################
@@ -103,7 +104,7 @@ module.exports = (grunt)->
'./test/test_helper.coffee' './test/test_helper.coffee'
] ]
verbose: true verbose: true
src: './test/**/*.test.coffee' src: ['./test/**/*.test.coffee']
rsync: rsync:
static: static:
@@ -168,3 +169,12 @@ module.exports = (grunt)->
fs.symlinkSync '../../crafting-guide-common/', './node_modules/crafting-guide-common' fs.symlinkSync '../../crafting-guide-common/', './node_modules/crafting-guide-common'
grunt.registerTask 'test', ['mochaTest'] grunt.registerTask 'test', ['mochaTest']
args = process.argv[..]
while args.length > 0
switch args[0]
when '--grep'
args.shift()
grunt.config.merge mochaTest:options:grep:args[0]
args.shift()