Permalink
Browse files

Filter tests to be run by jasmine

Possibility to filter which attester specs should run;
useful for debugging attester.

Usage:
 grunt jasmine_node --grep=<pattern>

Close #60.
  • Loading branch information...
1 parent a568c69 commit e2ead8535c1490668337b7824e1c9bc84bf8d903 @jakub-g jakub-g committed with jakub-g Oct 3, 2013
Showing with 7 additions and 0 deletions.
  1. +7 −0 Gruntfile.js
View
@@ -14,6 +14,12 @@
*/
module.exports = function (grunt) {
+ // One may filter tests to be run; useful for debugging.
+ // Usage (any regexp should do):
+ // grunt jasmine_node --grep=load_plugin
+ // grunt jasmine_node --grep="(event.*|config)"
+ var grep = grunt.option('grep') || "";
+
grunt.initConfig({
jshint: {
all : ['package.json', 'grunt.js', 'lib/**/*.js', 'spec/**/*.spec.js', '!lib/**/html5shiv.js'],
@@ -27,6 +33,7 @@ module.exports = function (grunt) {
tasks: ['dev']
},
jasmine_node: {
+ match : grep + ".", // "." is the default
forceExit: true
},
beautify: {

1 comment on commit e2ead85

@jakub-g
Collaborator

To grep multiple, use parens: grunt jasmine_node --grep='(cli|timeout|full-campaign)'

Please sign in to comment.