Skip to content

Instantly share code, notes, and snippets.

@superchris
Created July 14, 2010 22:42
Show Gist options
  • Save superchris/476209 to your computer and use it in GitHub Desktop.
Save superchris/476209 to your computer and use it in GitHub Desktop.
<script>
function runSuites() {
// uncomment when we move away from the grammar
//JSpec.preprocess = function(code) { return code; }
var matches = /.*\?test=(.*)/.exec(document.URL);
if (matches)
{
JSpec
.exec(matches[1])
.run({ failuresOnly: false, fixturePath: 'fixtures' })
.report();
} else {
// run the whole suite
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment