Skip to content

Instantly share code, notes, and snippets.

@jsakamoto
Created September 20, 2012 00:07
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 jsakamoto/3753136 to your computer and use it in GitHub Desktop.
Save jsakamoto/3753136 to your computer and use it in GitHub Desktop.
function setupFixture(f) {
var html = Enumerable.from(f.toString().split('\n'))
.select("$.trim()")
.skipWhile("$.slice(-2) != '/*'")
.skip(1)
.takeWhile("$.slice(0, 2) != '*/'");
$('#qunit-fixture').html(html.toArray().join(''));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment