Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing the isInterceptable, intercept methods #49

Open
sureshseban opened this issue Jun 20, 2022 · 0 comments
Open

Testing the isInterceptable, intercept methods #49

sureshseban opened this issue Jun 20, 2022 · 0 comments

Comments

@sureshseban
Copy link

sureshseban commented Jun 20, 2022

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
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant