Skip to content

Commit

Permalink
Remove testing code
Browse files Browse the repository at this point in the history
  • Loading branch information
JunTaoLuo committed Dec 30, 2024
1 parent d26a853 commit 6477739
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/applications/vaos/utils/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export function recordItemsRetrieved(type, count) {

export const NULL_STATE_FIELD = {
TYPE_OF_CARE: 'type-of-care',
PROVIDER: 'provider',
};

/**
Expand All @@ -68,22 +67,16 @@ export function recordAppointmentDetailsNullStates(nullStates) {

// Always increment total expected count
recordEvent({ event: `${nullStateEventPrefix}-expected-total` });
// eslint-disable-next-line no-console
console.log(`incrementing ${nullStateEventPrefix}-expected-total`);

// Examine each field type and determine which events should be logged
Object.values(NULL_STATE_FIELD).forEach(key => {
// Only log events if a field exists in the input dictionary, otherwise ignore it
if (key in nullStates) {
// Record the expected event
recordEvent({ event: `${nullStateEventPrefix}-expected-${key}` });
// eslint-disable-next-line no-console
console.log(`incrementing ${nullStateEventPrefix}-expected-${key}`);
// Record the missing event if needed and updated anyNullState
if (nullStates[key]) {
recordEvent({ event: `${nullStateEventPrefix}-missing-${key}` });
// eslint-disable-next-line no-console
console.log(`incrementing ${nullStateEventPrefix}-missing-${key}`);
anyNullState = true;
}
}
Expand All @@ -92,7 +85,5 @@ export function recordAppointmentDetailsNullStates(nullStates) {
// Increment if any null states were present
if (anyNullState) {
recordEvent({ event: `${nullStateEventPrefix}-missing-any` });
// eslint-disable-next-line no-console
console.log(`incrementing ${nullStateEventPrefix}-missing-any`);
}
}

0 comments on commit 6477739

Please sign in to comment.