Skip to content

Commit

Permalink
add getInfuraBlocked selector spec
Browse files Browse the repository at this point in the history
  • Loading branch information
jiexi committed Sep 20, 2023
1 parent ff6ede4 commit 2d13a1d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions ui/selectors/selectors.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -737,4 +737,24 @@ describe('Selectors', () => {
mockState.metamask.snapsInstallPrivacyWarningShown = null;
expect(selectors.getSnapsInstallPrivacyWarningShown(mockState)).toBe(false);
});

it('#getInfuraBlocked', () => {
let isInfuraBlocked = selectors.getInfuraBlocked(mockState);
expect(isInfuraBlocked).toBe(false);

const modifiedMockState = {
...mockState,
metamask: {
...mockState.metamask,
networksMetadata: {
...mockState.metamask.networksMetadata,
goerli: {
status: 'blocked',
},
},
},
};
isInfuraBlocked = selectors.getInfuraBlocked(modifiedMockState);
expect(isInfuraBlocked).toBe(true);
});
});

0 comments on commit 2d13a1d

Please sign in to comment.