Skip to content

Instantly share code, notes, and snippets.

@gpickin
Created May 9, 2015 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gpickin/e6ce95a1d1bf7c98da30 to your computer and use it in GitHub Desktop.
Save gpickin/e6ce95a1d1bf7c98da30 to your computer and use it in GitHub Desktop.
This is a Cordova Hook that runs your Jasmine tests automatically. Best to run after 02_jshint.js in the before_prepare folder
#!/usr/bin/env node
var path = require('path');
var Command = require('../../node_modules/jasmine/lib/command.js');
var Jasmine = require('../../node_modules/jasmine/lib/jasmine.js');
var thePath = path.join( path.resolve(), 'www');
var jasmine = new Jasmine({ projectBaseDir: thePath });
var examplesDir = path.join(__dirname, '..', 'node_modules', 'jasmine-core', 'lib', 'jasmine-core', 'example', 'node_example');
var command = new Command(thePath);
console.log('Running Jasmine Tests');
command.run(jasmine, [] );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment