Skip to content

Commit 41f4f1d

Browse files
committed
test: move addRequestHandler initialization to individual test
1 parent 1c86179 commit 41f4f1d

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

packages/assets-controllers/src/TokensController.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,8 +1226,6 @@ describe('TokensController', () => {
12261226
.spyOn(ERC20Standard.prototype as any, 'getTokenDecimals')
12271227
.mockImplementationOnce(() => a.decimals?.toString());
12281228
});
1229-
1230-
let addRequestHandler: jest.Mock;
12311229
let createEthersStub: sinon.SinonStub;
12321230
beforeEach(function () {
12331231
type = ERC20;
@@ -1238,7 +1236,6 @@ describe('TokensController', () => {
12381236
image: 'image',
12391237
name: undefined,
12401238
};
1241-
addRequestHandler = jest.fn();
12421239

12431240
isERC721 = false;
12441241
isERC1155 = false;
@@ -1576,6 +1573,7 @@ describe('TokensController', () => {
15761573
} as unknown as ReturnType<NetworkController['getNetworkClientById']>;
15771574
});
15781575

1576+
const addRequestHandler = jest.fn();
15791577
messenger.unregisterActionHandler(`ApprovalController:addRequest`);
15801578
messenger.registerActionHandler(
15811579
`ApprovalController:addRequest`,

0 commit comments

Comments
 (0)