Cleanup runTime.ts

This commit is contained in:
Sidharth Vinod
2024-01-26 02:07:55 +05:30
parent dc476233ba
commit 781945325d
2 changed files with 10 additions and 17 deletions

View File

@@ -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

View File

@@ -114,19 +114,18 @@ const htmlTable = (data: string[][]): string => {
let table = `<table border='1' style="border-collapse: collapse">`;
// Generate table header
table += '<tr>';
for (const header of data[0]) {
table += `<th>${header}</th>`;
}
table += '</tr>';
table += `<tr>
${data
.shift()!
.map((header) => `<th>${header}</th>`)
.join('')}
</tr>`;
// Generate table rows
for (let i = 1; i < data.length; i++) {
table += '<tr>';
for (let j = 0; j < data[i].length; j++) {
table += `<td>${data[i][j]}</td>`;
}
table += '</tr>';
for (const row of data) {
table += `<tr>
${row.map((cell) => `<td>${cell}</td>`).join('')}
</tr>`;
}
table += '</table>';