Skip to content

Commit

Permalink
test: remove coverage from library cases
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Apr 16, 2024
1 parent 58a5c8c commit 8cd53fe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/search-modal/SearchResult.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,16 @@ const SearchResult = ({ hit, closeSearch }) => {
e.stopPropagation();

if (!redirectUrl) {
return;
// This case is for the library authoring MFE
return; // pragma: no cover

Check warning on line 132 in src/search-modal/SearchResult.jsx

View check run for this annotation

Codecov / codecov/patch

src/search-modal/SearchResult.jsx#L132

Added line #L132 was not covered by tests
}

if ('key' in e && e.key !== 'Enter' && e.key !== ' ') {
return;

Check warning on line 136 in src/search-modal/SearchResult.jsx

View check run for this annotation

Codecov / codecov/patch

src/search-modal/SearchResult.jsx#L136

Added line #L136 was not covered by tests
}

if (redirectUrl.startsWith('http')) {
if (redirectUrl.startsWith('http')) { // pragma: no cover
// This case is for the library authoring MFE
window.location.href = redirectUrl;
return;

Check warning on line 142 in src/search-modal/SearchResult.jsx

View check run for this annotation

Codecov / codecov/patch

src/search-modal/SearchResult.jsx#L141-L142

Added lines #L141 - L142 were not covered by tests
}
Expand Down

0 comments on commit 8cd53fe

Please sign in to comment.