Skip to content

Commit

Permalink
Mock method middleware in test
Browse files Browse the repository at this point in the history
  • Loading branch information
rekmarks committed May 2, 2024
1 parent 5aeb328 commit d84cfdb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/scripts/metamask-controller.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,15 @@ const createLoggerMiddlewareMock = () => (req, res, next) => {
}
next();
};

jest.mock('./lib/createLoggerMiddleware', () => createLoggerMiddlewareMock);

const rpcMethodMiddlewareMock = {
createMethodMiddleware: () => (_req, _res, next, _end) => {
next();
},
};
jest.mock('./lib/rpc-method-middleware', () => rpcMethodMiddlewareMock);

jest.mock(
'./controllers/preferences',
() =>
Expand Down

0 comments on commit d84cfdb

Please sign in to comment.