Skip to content

Instantly share code, notes, and snippets.

@ninjascience
ninjascience / MockReturn.js
Created June 30, 2014 17:23
Mock return object from browse my ballot service
races = {
local: [
{
name: randoRace(),
description: 'What do they do?',
campaigns: [
{
id: _.uniqueId(),
name: chance.name(),
party: 'Independent',
@ninjascience
ninjascience / Gruntfile.js
Created January 24, 2013 17:52
Gruntfile.js for testing with Jasmine and RequireJS and using Istanbul for coverage.
module.exports = function(grunt) {
'use strict';
// Project configuration.
grunt.initConfig({
meta : {
// Specify where our test files are. Once we get all the tests switched over we can use 'test/js/**/*.spec.js' to automatically load all tests.
specs : ['test/js/src/**/*.spec.js'],
bin : {
coverage: 'js/bin/coverage'
@ninjascience
ninjascience / Gruntfile.js
Created November 28, 2012 17:35
Custom config.js example with grunt-contrib-jasmine
module.exports = function(grunt) {
'use strict';
// Project configuration.
grunt.initConfig({
meta : {
src : ['public/js/src/**/*.js'],
specs : 'public/js/spec/**/*.spec.js'
},
watch: {