After adding support for cookies and session in express version 4 - my functional tests stopped working.
Bellow are the functional tests + comments with some explanations.
Anyway, thanks for this amazing library.
BR,
Victor
N.B.:
I'm still a newbie to node.js - so sorry if the code below + my fix don't look good :)
My functional test with mocha:
var www = require('../../bin/www');
var tobi = require('tobi');
var app = require('../../app');
var browser = tobi.createBrowser(3000, '127.0.0.1');
describe('index', function() {
it ('should get index', function(done) {
// This is the line of code that didn't work - got the following error:
// "TypeError: Cannot read property 'url' of undefined"
browser.get('/', function(res, $) {
res.should.have.status(200);
// I've added this test in order to make sure my fix will work with other url's
it ('should get register page', function(done) {
browser.get('/register', function(res, $) {
res.should.have.status(200);
done();
});
});
Hi,
After adding support for cookies and session in express version 4 - my functional tests stopped working.
Bellow are the functional tests + comments with some explanations.
Anyway, thanks for this amazing library.
BR, Victor N.B.:
var www = require('../../bin/www'); var tobi = require('tobi'); var app = require('../../app'); var browser = tobi.createBrowser(3000, '127.0.0.1');
describe('index', function() { it ('should get index', function(done) { // This is the line of code that didn't work - got the following error: // "TypeError: Cannot read property 'url' of undefined" browser.get('/', function(res, $) { res.should.have.status(200);
});
// I've added this test in order to make sure my fix will work with other url's it ('should get register page', function(done) { browser.get('/register', function(res, $) { res.should.have.status(200); done(); }); });
});