Sha256: 1140c431e166ae724f72eb0a8fe517c2fd68c287556b15904bf5058b5add2814
Contents?: true
Size: 1.09 KB
Versions: 1
Compression:
Stored size: 1.09 KB
Contents
(function() { var port = phantom.args[0], filter = phantom.args[1]; if (!parseInt(port, 10) || phantom.args.length > 2) { console.log('Usage: run-jasmine.js PORT [spec_name_filter]'); phantom.exit(1); } var page = require('webpage').create(), fs = require('fs'); var url = 'http://localhost:' + port; if (filter) { url += '?spec=' + encodeURIComponent(filter); } page.open(url, function(status) { if (status !== "success") { console.log("Unable to access network"); phantom.exit(1); } else { var json = page.evaluate(function() { var topLevelSuites = [], suites = jasmine.getEnv().currentRunner().topLevelSuites(); for (var i = 0; i < suites.length; i++) { var suite = suites[i]; topLevelSuites.push({ id: suite.id, description: suite.description }); } return JSON.stringify({ suites: jsApiReporter.suites(), top_level_suites: topLevelSuites }); }); fs.write('/dev/stdout', json, 'w'); phantom.exit(0); } }); }).call(this);
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
phantom_jasmine-0.0.7 | lib/jasmine/runners/phantom_jasmine_count.js |