From 54f0ffc3697bf7b286ec48ab7a0adbc0ba6df796 Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Tue, 2 Jul 2024 13:25:09 +0200 Subject: [PATCH] refactor(observatory): rename {SORTED_TEST_NAMES => TEST_NAMES_IN_ORDER} --- client/src/observatory/results/tests.tsx | 4 ++-- client/src/observatory/types.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/observatory/results/tests.tsx b/client/src/observatory/results/tests.tsx index 7291cddcca89..604f98684282 100644 --- a/client/src/observatory/results/tests.tsx +++ b/client/src/observatory/results/tests.tsx @@ -1,5 +1,5 @@ import { useMemo } from "react"; -import { ObservatoryResult, SORTED_TEST_NAMES } from "../types"; +import { ObservatoryResult, TEST_NAMES_IN_ORDER } from "../types"; import { formatMinus, Link, PassIcon } from "../utils"; export function ObservatoryTests({ result }: { result: ObservatoryResult }) { @@ -22,7 +22,7 @@ export function ObservatoryTests({ result }: { result: ObservatoryResult }) { - {SORTED_TEST_NAMES.map((name) => { + {TEST_NAMES_IN_ORDER.map((name) => { const test = result.tests[name]; return ( test && ( diff --git a/client/src/observatory/types.ts b/client/src/observatory/types.ts index 3c1c9afddf7c..a262b1831305 100644 --- a/client/src/observatory/types.ts +++ b/client/src/observatory/types.ts @@ -26,8 +26,8 @@ export const SCORING_TABLE = [ { grade: "F", scoreText: "0", score: 0 }, ]; -// Maintain consistent test sorting -export const SORTED_TEST_NAMES = [ +// Maintain consistent test order. +export const TEST_NAMES_IN_ORDER = [ "content-security-policy", "cookies", "cross-origin-resource-sharing",