From 781945325d72b1e1f43bd55b27bab5b5127c58e7 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 26 Jan 2024 02:07:55 +0530 Subject: [PATCH] Cleanup runTime.ts --- .github/workflows/e2e.yml | 6 ------ scripts/runTime.ts | 21 ++++++++++----------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 2ab827d0c..2613f33b2 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -69,9 +69,6 @@ jobs: start: pnpm run dev wait-on: 'http://localhost:9000' browser: chrome - spec: | - cypress/integration/rendering/classDiagram.spec.js - cypress/integration/rendering/flowchart-v2.spec.js - name: Move runtime data if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' }} @@ -148,9 +145,6 @@ jobs: # e.g. if this action was run from a fork record: ${{ secrets.CYPRESS_RECORD_KEY != '' }} parallel: ${{ secrets.CYPRESS_RECORD_KEY != '' }} - spec: | - cypress/integration/rendering/classDiagram.spec.js - cypress/integration/rendering/flowchart-v2.spec.js env: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} VITEST_COVERAGE: true diff --git a/scripts/runTime.ts b/scripts/runTime.ts index 22c44bba3..d8da3203d 100644 --- a/scripts/runTime.ts +++ b/scripts/runTime.ts @@ -114,19 +114,18 @@ const htmlTable = (data: string[][]): string => { let table = ``; // Generate table header - table += ''; - for (const header of data[0]) { - table += ``; - } - table += ''; + table += ` + ${data + .shift()! + .map((header) => ``) + .join('')} + `; // Generate table rows - for (let i = 1; i < data.length; i++) { - table += ''; - for (let j = 0; j < data[i].length; j++) { - table += ``; - } - table += ''; + for (const row of data) { + table += ` + ${row.map((cell) => ``).join('')} + `; } table += '
${header}
${header}
${data[i][j]}
${cell}
';