Skip to content

Instantly share code, notes, and snippets.

@eriwen
eriwen / qunit-to-junit-for-phantom.js
Created November 14, 2011 02:33
JUnit XML output for QUnit tests compatible with PhantomJS 1.3
var module, moduleStart, testStart, testCases = [],
current_test_assertions = [];
console.log('<?xml version="1.0" encoding="UTF-8"?>');
console.log('<testsuites name="testsuites">');
QUnit.begin = function() {
// That does not work when invoked in PhantomJS
}
QUnit.moduleStart = function(context) {
moduleStart = new Date();