For e.g., to mock GET http://abc.com/:id?api_key=XYZ
var dopple = require('doppleganger');
var doppleURL = "http:/abc.com";
var done;
var ender = function(err, res) {
console.log(res.headers);
console.log(res.body);
}
dopple.base(doppleURL)
.get( { query: { 'api_key': 'xyz' }, params: { id: '.*' } } )
.respond( { header: { code: 200 }, body: require('./fixture1.json') } );
.end(cb);
1 mock a URL namespace with http
2 assert presence of URI parameters
3 fail if the mock isn't called in the duration of the test