Skip to content

Commit

Permalink
Test that the context is provided as the fulfillment value.
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Mar 17, 2017
1 parent 056e4bb commit 4f837a3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/unexpectedHttp.js
Expand Up @@ -156,6 +156,23 @@ describe('unexpected-http', function () {
serverUrl = 'http://' + serverHostname + ':' + serverAddress.port + '/';
});

it('should provide a context object', function () {
handleRequest = function (req, res) {
res.writeHead(503);
res.end();
};
return expect({
url: serverUrl,
timeout: 20
}, 'to yield HTTP response satisfying', 503).then(function (context) {
expect(context, 'to satisfy', {
httpRequest: {},
httpResponse: {},
httpExchange: {}
});
});
});

describe('within a timeout', function () {
beforeEach(function () {
handleRequest = function (req, res) {
Expand Down

0 comments on commit 4f837a3

Please sign in to comment.