From aa45b63ff10fa034eef0efad81f0f3657faa1eab Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Sat, 20 Apr 2024 16:25:19 -0700 Subject: [PATCH] test: fix existing tests --- tests/DataTableAppendColumns.test.svelte | 56 ++++++++++++++++--- tests/DataTableBatchSelection.test.svelte | 2 +- ...DataTableBatchSelectionToolbar.test.svelte | 2 +- tests/RadioSelectableDataTable.test.svelte | 2 +- tests/SelectableDataTable.test.svelte | 2 +- 5 files changed, 52 insertions(+), 12 deletions(-) diff --git a/tests/DataTableAppendColumns.test.svelte b/tests/DataTableAppendColumns.test.svelte index 34913c63..c7ca7180 100644 --- a/tests/DataTableAppendColumns.test.svelte +++ b/tests/DataTableAppendColumns.test.svelte @@ -6,19 +6,59 @@ { key: "port", value: "Port" }, { key: "rule", value: "Rule" }, { key: "overflow", empty: true }, - ]; + ] as const; const rows = [ - { id: "a", name: "Load Balancer 3", port: 3000, rule: "Round robin" }, - { id: "b", name: "Load Balancer 1", port: 443, rule: "Round robin" }, - { id: "c", name: "Load Balancer 2", port: 80, rule: "DNS delegation" }, - { id: "d", name: "Load Balancer 6", port: 3000, rule: "Round robin" }, - { id: "e", name: "Load Balancer 4", port: 443, rule: "Round robin" }, - { id: "f", name: "Load Balancer 5", port: 80, rule: "DNS delegation" }, + { + id: "a", + name: "Load Balancer 3", + port: 3000, + rule: "Round robin", + overflow: null, + }, + { + id: "b", + name: "Load Balancer 1", + port: 443, + rule: "Round robin", + overflow: null, + }, + { + id: "c", + name: "Load Balancer 2", + port: 80, + rule: "DNS delegation", + overflow: null, + }, + { + id: "d", + name: "Load Balancer 6", + port: 3000, + rule: "Round robin", + overflow: null, + }, + { + id: "e", + name: "Load Balancer 4", + port: 443, + rule: "Round robin", + overflow: null, + }, + { + id: "f", + name: "Load Balancer 5", + port: 80, + rule: "DNS delegation", + overflow: null, + }, ]; - + {#if cell.key === "overflow"} diff --git a/tests/DataTableBatchSelection.test.svelte b/tests/DataTableBatchSelection.test.svelte index f10f8a6b..b83ee2d8 100644 --- a/tests/DataTableBatchSelection.test.svelte +++ b/tests/DataTableBatchSelection.test.svelte @@ -5,7 +5,7 @@ { key: "name", value: "Name" }, { key: "port", value: "Port" }, { key: "rule", value: "Rule" }, - ]; + ] as const; const rows = [ { id: "a", name: "Load Balancer 3", port: 3000, rule: "Round robin" }, diff --git a/tests/DataTableBatchSelectionToolbar.test.svelte b/tests/DataTableBatchSelectionToolbar.test.svelte index 0fe5c25e..4c85f2a9 100644 --- a/tests/DataTableBatchSelectionToolbar.test.svelte +++ b/tests/DataTableBatchSelectionToolbar.test.svelte @@ -15,7 +15,7 @@ { key: "name", value: "Name" }, { key: "port", value: "Port" }, { key: "rule", value: "Rule" }, - ]; + ] as const; const rows = [ { id: "a", name: "Load Balancer 3", port: 3000, rule: "Round robin" }, diff --git a/tests/RadioSelectableDataTable.test.svelte b/tests/RadioSelectableDataTable.test.svelte index 07f60d72..79cd4cf5 100644 --- a/tests/RadioSelectableDataTable.test.svelte +++ b/tests/RadioSelectableDataTable.test.svelte @@ -5,7 +5,7 @@ { key: "name", value: "Name" }, { key: "port", value: "Port" }, { key: "rule", value: "Rule" }, - ]; + ] as const; const rows = [ { id: "a", name: "Load Balancer 3", port: 3000, rule: "Round robin" }, diff --git a/tests/SelectableDataTable.test.svelte b/tests/SelectableDataTable.test.svelte index 953d133e..7c079b4f 100644 --- a/tests/SelectableDataTable.test.svelte +++ b/tests/SelectableDataTable.test.svelte @@ -5,7 +5,7 @@ { key: "name", value: "Name" }, { key: "port", value: "Port" }, { key: "rule", value: "Rule" }, - ]; + ] as const; const rows = [ { id: "a", name: "Load Balancer 3", port: 3000, rule: "Round robin" },