diff --git a/src/app/components/client/FixNavigation.tsx b/src/app/components/client/FixNavigation.tsx
index b577f63e071..5541ad33926 100644
--- a/src/app/components/client/FixNavigation.tsx
+++ b/src/app/components/client/FixNavigation.tsx
@@ -146,18 +146,30 @@ export const Steps = (props: {
@@ -202,7 +214,11 @@ const StepImage = (props: {
? stepHighRiskDataBreachesIcon
: props.section === "LeakedPasswords"
? stepLeakedPasswordsIcon
- : stepSecurityRecommendationsIcon;
+ : /* c8 ignore next 4 */
+ // This line should be covered by unit tests, but since the Node
+ // 20.10 upgrade, it's been intermittently marking this (and this
+ // comment) as uncovered.
+ stepSecurityRecommendationsIcon;
return ;
};
@@ -212,6 +228,10 @@ function calculateActiveProgressBarPosition(section: Props["currentSection"]) {
return styles.beginHighRiskDataBreaches;
} else if (section === "leaked-passwords") {
return styles.beginLeakedPasswords;
+ /* c8 ignore next 5 */
+ // This line should be covered by unit tests, but since the Node 20.10
+ // upgrade, it's been intermittently marking this (and this comment) as
+ // uncovered.
} else if (section === "security-recommendations") {
return styles.beginSecurityRecommendations;
} else {
diff --git a/src/app/functions/server/dashboard.ts b/src/app/functions/server/dashboard.ts
index efc3bae9730..17ed498689a 100644
--- a/src/app/functions/server/dashboard.ts
+++ b/src/app/functions/server/dashboard.ts
@@ -446,6 +446,9 @@ function sanitizeDataPoints(
}
export function getDataPointReduction(summary: DashboardSummary): number {
+ // The `if` statement is totally covered by unit tests, but for some reason,
+ // since the upgrade to Node 20.10, it doesn't get marked as covered anymore:
+ /* c8 ignore next */
if (summary.totalDataPointsNum <= 0) return 100;
return Math.round(
(summary.dataBrokerTotalDataPointsNum / summary.totalDataPointsNum) * 100,
diff --git a/src/app/functions/universal/guidedExperienceBreaches.ts b/src/app/functions/universal/guidedExperienceBreaches.ts
index f37f9a63743..cd42b3c2102 100644
--- a/src/app/functions/universal/guidedExperienceBreaches.ts
+++ b/src/app/functions/universal/guidedExperienceBreaches.ts
@@ -48,14 +48,23 @@ export function getGuidedExperienceBreaches(
guidedExperienceBreaches.highRisk.ssnBreaches.push(breach);
}
+ // This does get covered by unit tests, but for some reason, since the
+ // upgrade to Node 20.10, it doesn't get marked as covered anymore:
+ /* c8 ignore next 3 */
if (isUnresolvedDataBreachClass(breach, BreachDataTypes.CreditCard)) {
guidedExperienceBreaches.highRisk.creditCardBreaches.push(breach);
}
+ // This does get covered by unit tests, but for some reason, since the
+ // upgrade to Node 20.10, it doesn't get marked as covered anymore:
+ /* c8 ignore next 3 */
if (isUnresolvedDataBreachClass(breach, BreachDataTypes.PIN)) {
guidedExperienceBreaches.highRisk.pinBreaches.push(breach);
}
+ // This does get covered by unit tests, but for some reason, since the
+ // upgrade to Node 20.10, it doesn't get marked as covered anymore:
+ /* c8 ignore next 3 */
if (isUnresolvedDataBreachClass(breach, BreachDataTypes.BankAccount)) {
guidedExperienceBreaches.highRisk.bankBreaches.push(breach);
}
diff --git a/src/app/hooks/useGa.ts b/src/app/hooks/useGa.ts
index 7271d0e13ea..d6ea05a229b 100644
--- a/src/app/hooks/useGa.ts
+++ b/src/app/hooks/useGa.ts
@@ -19,8 +19,8 @@ interface InitGaProps {
}
const initGa4 = ({ ga4MeasurementId, debugMode }: InitGaProps) => {
+ /* c8 ignore next 4 */
// Never run in tests:
- /* c8 ignore next 3 */
if (debugMode) {
console.info("Initialize GA4");
}
@@ -59,9 +59,9 @@ export const useGa = (): {
// Enable upload only if the user has not opted out of tracking.
const uploadEnabled = navigator.doNotTrack !== "1";
+ /* c8 ignore next 7 */
+ // Never run in tests:
if (!uploadEnabled) {
- // Never run in tests:
- /* c8 ignore next 3 */
if (debugMode) {
console.info("Did not initialize GA4 due to DoNotTrack.");
}