Skip to content

Instantly share code, notes, and snippets.

@omnicolor
omnicolor / UnitTestsOnCheckin.php
Created February 6, 2012 16:19
Pre-commit SVN script to run unit tests
#!/usr/local/bin/php
<?php
/**
* Pre-commit Subversion script that runs unit tests.
* @author Omni Adams <omni@digitaldarkness.com>
* @copyright 2010 Digital Darkness
*/
/**
@omnicolor
omnicolor / testRunner.js
Created February 1, 2012 15:46
Test runner for Closure unit tests
/**
* @fileoverview Test runner for running unit tests from the command line.
*
* Copyright 2012 Digital Darkness
*/
goog.require('goog.testing.jsunit');
/**
* Success or failure indications.
@omnicolor
omnicolor / build.xml
Created February 1, 2012 15:43
Closure unit testing build target
<target name="test-js">
<echo message="Running javascript unit tests" />
<concat destfile="tests-concat.js">
<fileset dir="tests" includes="*Test.js" />
</concat>
<exec executable="${library}/bin/calcdeps.py">
<arg value="--compiler_flag=--compilation_level=WHITESPACE_ONLY" />
<arg value="--compiler_jar=${compiler}" />
<arg value="--input=scripts/foo.js" />
<arg value="--input=tests-concat.js" />