Skip to content

Commit

Permalink
refactor(observatory): rename {SORTED_TEST_NAMES => TEST_NAMES_IN_ORDER}
Browse files Browse the repository at this point in the history
  • Loading branch information
caugner committed Jul 2, 2024
1 parent d6f80b5 commit 54f0ffc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client/src/observatory/results/tests.tsx
Original file line number Diff line number Diff line change
@@ -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 }) {
Expand All @@ -22,7 +22,7 @@ export function ObservatoryTests({ result }: { result: ObservatoryResult }) {
</tr>
</thead>
<tbody>
{SORTED_TEST_NAMES.map((name) => {
{TEST_NAMES_IN_ORDER.map((name) => {
const test = result.tests[name];
return (
test && (
Expand Down
4 changes: 2 additions & 2 deletions client/src/observatory/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 54f0ffc

Please sign in to comment.