Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
describe('method forcing', () => {
const spy = sinon.spy();
afterEach("reset console.warn", () => {
spy.reset();
});
function middlewareHook(this: any, next: (...args: any[]) => any, methodArguments: any[]) {
spy();
return next(...methodArguments);
}
function beforeHook(this: any, methodArguments: any[]) {
spy();
return methodArguments;
}
function afterHook(this: any, methodResult: any) {