Skip to content

Instantly share code, notes, and snippets.

@mallorym
Last active August 29, 2015 14:25
Show Gist options
  • Select an option

  • Save mallorym/f826ed8d97f2394fa090 to your computer and use it in GitHub Desktop.

Select an option

Save mallorym/f826ed8d97f2394fa090 to your computer and use it in GitHub Desktop.
Access paths from a separate tests.json file
grunt.registerTask(process.env.X, 'Running all tests based on the organism', function() {
var tests = grunt.file.readJSON('test/tests.json');
var category = tests[process.env.X]
for (var i in category) {
var component = category[i].path + "\n";
grunt.config.set('simplemocha.sauce.src', 'test/sauce/' + component);
grunt.task.run('testing');
}
});
//process.env.X was the individual component selected. Then it went through each category associated with the component to grab the path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment