Skip to content

Commit c7561d7

Browse files
committed
test: return type
1 parent 1358b5f commit c7561d7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

packages/keyring-controller/src/KeyringController.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3124,6 +3124,21 @@ describe('KeyringController', () => {
31243124
expect(controller.withKeyring).toHaveBeenCalledWith(selector, fn);
31253125
});
31263126
});
3127+
3128+
it('should return the function result', async () => {
3129+
await withController(async ({ messenger }) => {
3130+
const selector = { type: KeyringTypes.hd };
3131+
const fn = async () => 'foo';
3132+
3133+
const result: string = await messenger.call(
3134+
'KeyringController:withKeyring',
3135+
selector,
3136+
fn,
3137+
);
3138+
3139+
expect(result).toBe('foo');
3140+
});
3141+
});
31273142
});
31283143

31293144
describe('prepareUserOperation', () => {

0 commit comments

Comments
 (0)