Skip to content

using localhost as test server locally fails #27

Description

@AndreasMadsen

I reproduces this on a mac, where I updated browser-launcher to 0.2.0

To reproduce run this testing file with testling example/localhost.js --browser=chrome.

var test = require('../');

test('title test', function (t) {
    var w = t.createWindow('http://localhost:17000/', { t : t });
    w.next(function (win, $) {
        t.equal(win.location.href, 'http://localhost:17000/');
        t.equal(win.document.title, 'Localhost Test');
        t.end();
    });
});

The localhost server looks like this:

var http = require('http');
var path = require('path');
var filed = require('filed');

var server = http.createServer(function (req, res) {
    req.pipe(filed( path.resolve(__dirname, 'index.html') )).pipe(res);
});

server.listen(17000, '127.0.0.1', function () {
    console.log('ready on 127.0.0.1:17000');
});
<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Localhost Test</title>
    </head>
    <body>
        Hallo World
    </body>
</html>

It should be noted that testling example/window.js --browser=chrome works perfectly!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions