Skip to content

Commit 930d041

Browse files
committed
Add istanbul ignore to assertions
1 parent 050850a commit 930d041

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/actions/receive-profile.js

+4
Original file line numberDiff line numberDiff line change
@@ -1489,6 +1489,7 @@ export function viewProfileFromPostMessage(
14891489
return async (dispatch) => {
14901490
try {
14911491
const profile = await unserializeProfileOfArbitraryFormat(rawProfile);
1492+
/* istanbul ignore if */
14921493
if (profile === undefined) {
14931494
throw new Error('Unable to parse the profile.');
14941495
}
@@ -1497,6 +1498,7 @@ export function viewProfileFromPostMessage(
14971498
await dispatch(viewProfile(profile));
14981499
});
14991500
} catch (error) {
1501+
/* istanbul ignore next */
15001502
dispatch(fatalError(error));
15011503
}
15021504
};
@@ -1647,6 +1649,7 @@ export function retrieveProfileForRawUrl(
16471649
window.addEventListener('message', (event) => {
16481650
const { data } = event;
16491651
console.log(`Received postMessage`, data);
1652+
/* istanbul ignore if */
16501653
if (!data || typeof data !== 'object') {
16511654
return;
16521655
}
@@ -1668,6 +1671,7 @@ export function retrieveProfileForRawUrl(
16681671
break;
16691672
}
16701673
default:
1674+
/* istanbul ignore next */
16711675
console.log('Unknown post message', data);
16721676
}
16731677
});

src/components/app/ProfileLoader.js

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ class ProfileLoaderImpl extends PureComponent<Props> {
8282
case 'unpublished':
8383
case 'none':
8484
// nothing to do
85+
/* istanbul ignore next */
8586
break;
8687
default:
8788
throw assertExhaustiveCheck(dataSource);

0 commit comments

Comments
 (0)