Skip to content

Commit

Permalink
PhantomJS 2.0 does not work with a relative path. Use file:/// See #1776
Browse files Browse the repository at this point in the history
  • Loading branch information
mbest committed Apr 28, 2017
1 parent f9fe3d4 commit 89617f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/runner.phantom.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
//THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

var system = require('system');
var fs = require('fs');

/**
* Wait until the test condition is true or a timeout occurs. Useful for waiting
Expand Down Expand Up @@ -78,7 +79,7 @@ page.onConsoleMessage = function(msg) {
};

// Run the specs against the latest minified build
page.open(system.args[1] || 'spec/runner.html?src=build/output/knockout-latest.js', function(status){
page.open('file:///' + fs.absolute('./' + (system.args[1] || 'spec/runner.html?src=build/output/knockout-latest.js')), function(status){
if (status !== "success") {
console.log("Unable to access network");
phantom.exit();
Expand Down

0 comments on commit 89617f7

Please sign in to comment.