Skip to content

Commit

Permalink
test: Mock TokenListController:stateChange event
Browse files Browse the repository at this point in the history
  • Loading branch information
MajorLift committed Jan 24, 2024
1 parent 77a8531 commit 8039cb8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/assets-controllers/src/TokensController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1957,8 +1957,13 @@ describe('TokensController', () => {
aggregators: ['Aave'],
},
};

await tokenListStateChangeListener({ tokenList: sampleMainnetTokenList });
messenger.publish(
'TokenListController:stateChange',
{
tokenList: sampleMainnetTokenList,
} as unknown as TokenListState,
[],
);

expect(tokensController.state.tokens[0]).toStrictEqual({
address: '0x01',
Expand Down

0 comments on commit 8039cb8

Please sign in to comment.