Skip to content

dewe/feiky

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

feiky

Build Status

Simple node fake http server, useful for testing end-to-end request across process boundaries.

var feiky = require('feiky'),
    server = feiky(8000);

...

// In test setup, tell feiky how to behave when call comes in
server.register('GET', /.*/, 200, "funky stuff");

...

// In test method, make a request to another server/proxy that 
// has this feiky instance as backend/upstream
request.get('http://localhost:4711/foo/bar', function (err, res) {
    assert.equal(res.statusCode, 200);
    assert.equal(server.lastRequest().path, '/foo/bar');
    done();
});

About

Simple fake http server

Resources

License

Stars

Watchers

Forks

Packages

No packages published