Sha256: 92d47d7409e2f934399b3f80b3b4ca3a5aa052041008583b604c52fcc478d08b
Contents?: true
Size: 1.07 KB
Versions: 12
Compression:
Stored size: 1.07 KB
Contents
var page = new WebPage(); page.open(phantom.args[0], function(status) { if (status !== 'success') { console.log('Cannot open Jasmine server page'); phantom.exit(); } else { window.setTimeout(function () { var result = page.evaluate(function() { var desc = document.querySelector('.runner .description').innerHTML; if (document.querySelector('.runner.failed')) { var failed = document.querySelectorAll('.spec.failed'), failMsgs = [], output = ''; for (var i = 0, l = failed.length; i < l; i += 1) { var msg = ' - ' + failed[i].querySelector('.description').title + ' (' + failed[i].querySelector('.messages .resultMessage').innerHTML + ')'; failMsgs.push(msg); }; output = '\n' + failMsgs.length + ' specs failed:\n\n' + failMsgs.join('\n') + '\n\n' + desc; return { msg:output, code:1 }; } else { return { msg:desc, code:0 }; }; }); console.log(result.msg); phantom.exit(result.code); }, 400); }; });
Version data entries
12 entries across 12 versions & 1 rubygems