Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions src/Scripts/table/Column.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,12 @@ describe("column", () => {
expect(col.class).toBe(columnClass);
});

it("should have id as a string", () => {
it.each([
["id"],
["label"],
["class"],
])("should have %s as a string", (property) => {
const col = new Column("col2", "Column 2", "class2");
expect(typeof col.id).toBe("string");
expect(typeof col[property as keyof Column]).toBe("string");
});

it("should have label as a string", () => {
const col = new Column("col3", "Column 3", "class3");
expect(typeof col.label).toBe("string");
});

it("should have class as a string", () => {
const col = new Column("col4", "Column 4", "class4");
expect(typeof col.class).toBe("string");
});
});
});
Loading