Skip to content

Mocking of header method #1

@hellboy81

Description

@hellboy81

I'm trying to use ``mock-req`

Initialization in Unit tests:

MockReq = require('mock-req'),
var req = new MockReq();
// req.header = function(){} // with this line it does not work also

Testable code:

if (req.header('content-range')) {

I'm getting message:

TypeError: Object #<MockIncomingMessage> has no method 'header'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions