1.0.5 • Published 9 years ago

simulated v1.0.5

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

simulated

This is supertest minus the assertions & expectations, used to simply mock API calls (when passed an express app instance) in an easier fashion than invoking the native express router. Big thanks to TJ.

simulated(app)
    .get('/endpoint')
    .end(function(err, response){                    
        //
        // i.e. use inside of socket.io connection,
        // make call without frontend XHR
        //
        if (response.error.status === 404) {
            socket.emit('news', response.error);
        } else {
            socket.emit('news', response.body);
        }
    });
1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago