Skip to content

Commit 870c57a

Browse files
committed
mock
1 parent 8265865 commit 870c57a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/integration/helpers.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ type WidenDeep<Type> = Type extends string
2626
// TODO: Fix in https://github.com/MetaMask/metamask-extension/issues/31860
2727
// eslint-disable-next-line @typescript-eslint/naming-convention
2828
export const createMockImplementation = <T,>(requests: Record<string, T>) => {
29-
return (method: string): Promise<T | undefined> => {
29+
return (method: string): Promise<T | undefined | string> => {
30+
if (method === 'getBearerToken') {
31+
return Promise.resolve('mock-bearer-token-for-tests');
32+
}
3033
if (method in requests) {
3134
return Promise.resolve(requests[method]);
3235
}

0 commit comments

Comments
 (0)