Skip to content

Instantly share code, notes, and snippets.

@jsakamoto
Created September 19, 2012 23:54
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/3753102 to your computer and use it in GitHub Desktop.
Save jsakamoto/3753102 to your computer and use it in GitHub Desktop.
function setupFixture(f) {
var lines = f.toString().split('\n'), html = [], i = 0;
do i++; while (!(lines[i-1].match(/\/\*[ \t\r]*$/)));
while (!(lines[i].match(/^[ \t\r]*\*\//))) html.push(lines[i++]);
$('#qunit-fixture').html(html.join(''));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment