Skip to content

Commit

Permalink
Add test for clicking data-sort twice.
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeWannacott committed May 18, 2023
1 parent 644c948 commit 54a3cca
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions test/table.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,38 @@ test("data-sort: example days of week", () => {
});
});

test("data-sort clicked twice: example days of week", () => {
expect(
createTestTable(
{
col0: [
"Saturday",
"Wednesday",
"Sunday",
"Friday",
"Thursday",
"Tuesday",
"Monday",
],
},
{ classTags: "data-sort" },
{
colsToClick: [0, 0],
}
)
).toStrictEqual({
col0: [
"Monday",
"Tuesday",
"Thursday",
"Friday",
"Sunday",
"Wednesday",
"Saturday",
],
});
});

test("disable-sort: disable sorting on a column", () => {
expect(
createTestTable(
Expand Down

0 comments on commit 54a3cca

Please sign in to comment.