Sha256: 645de22dc7963034c9301c15cd5fe477fb65ca86afc1a9168ad4755f78a8f10a
Contents?: true
Size: 595 Bytes
Versions: 23
Compression:
Stored size: 595 Bytes
Contents
function waitFor(e,t){e()?t():setTimeout(function(){waitFor(e,t)},250)}var page=require("webpage").create();page.open("http://localhost:3000/test/index.html",function(e){"success"!=e&&(console.log("page couldn't be loaded successfully"),phantom.exit(1)),waitFor(function(){return page.evaluate(function(){var e=document.getElementById("status");return e?/^(\d+ failures?|all passed)/i.test(e.innerText):!1})},function(){var e=page.evaluate(function(){return window.failed}),t=page.evaluate(function(){return document.getElementById("status").innerText});console.log(t),phantom.exit(e>0?1:0)})});
Version data entries
23 entries across 23 versions & 1 rubygems