Skip to content

Commit 8039cb8

Browse files
committed
test: Mock TokenListController:stateChange event
1 parent 77a8531 commit 8039cb8

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1957,8 +1957,13 @@ describe('TokensController', () => {
19571957
aggregators: ['Aave'],
19581958
},
19591959
};
1960-
1961-
await tokenListStateChangeListener({ tokenList: sampleMainnetTokenList });
1960+
messenger.publish(
1961+
'TokenListController:stateChange',
1962+
{
1963+
tokenList: sampleMainnetTokenList,
1964+
} as unknown as TokenListState,
1965+
[],
1966+
);
19621967

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

0 commit comments

Comments
 (0)