Skip to content

Testing the isInterceptable, intercept methods #49

@sureshseban

Description

@sureshseban

Hi Team/@EricLin2004/@pierrebeugnot,
Can any one provide me how can I test the interceptor methods using jest
I am using the library as below

import interceptor from 'express-interceptor';
const myMiddleWare = interceptor((req, res, next) => ({
isInterceptable() {
// do something..
return true;
},
intercept(body, send) {
// do something
return html
},
}));

export {
myMiddleWare
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions