Sha256: f8fdd3f1f518918934b4a3332f853179d4c9c16f9feb936b5cd120d4ec9e1fdd
Contents?: true
Size: 915 Bytes
Versions: 14
Compression:
Stored size: 915 Bytes
Contents
/* * Test runner for phantomjs */ var args = phantom.args; var page = require('webpage').create(); page.onConsoleMessage = function(msg) { console.log(msg); }; page.onInitialized = function() { page.evaluate(function () { window.OPAL_SPEC_PHANTOM = true; }); }; page.open(args[0], function(status) { if (status !== 'success') { console.error("Cannot load: " + args[0]); phantom.exit(1); } else { var timeout = parseInt(args[1] || 60000, 10); var start = Date.now(); var interval = setInterval(function() { if (Date.now() > start + timeout) { console.error("Specs timed out"); phantom.exit(124); } else { var code = page.evaluate(function() { return window.OPAL_SPEC_CODE; }); if (code === 0 || code === 1) { clearInterval(interval); phantom.exit(code); } } }, 500); } });
Version data entries
14 entries across 14 versions & 1 rubygems