Skip to content

Commit ae2de91

Browse files
committed
fix: remove tuple type annotations from mock.calls destructuring
The `: [string]` annotations are incompatible with vitest's `any[][]` typing for mock.calls, causing the TypeScript lint check to fail.
1 parent 089e706 commit ae2de91

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/Parser.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,10 @@ describe("API", () => {
190190

191191
expect(onclosetag).toHaveBeenCalledWith("tfoot", true);
192192
const tfootClose = onclosetag.mock.calls.findIndex(
193-
([name]: [string]) => name === "tfoot",
193+
([name]) => name === "tfoot",
194194
);
195195
const tbodyOpen = onopentagname.mock.calls.findIndex(
196-
([name]: [string]) => name === "tbody",
196+
([name]) => name === "tbody",
197197
);
198198
expect(tfootClose).toBeLessThan(tbodyOpen);
199199
});
@@ -208,10 +208,10 @@ describe("API", () => {
208208

209209
expect(onclosetag).toHaveBeenCalledWith("tbody", true);
210210
const tbodyClose = onclosetag.mock.calls.findIndex(
211-
([name]: [string]) => name === "tbody",
211+
([name]) => name === "tbody",
212212
);
213213
const theadOpen = onopentagname.mock.calls.findIndex(
214-
([name]: [string]) => name === "thead",
214+
([name]) => name === "thead",
215215
);
216216
expect(tbodyClose).toBeLessThan(theadOpen);
217217
});
@@ -227,10 +227,10 @@ describe("API", () => {
227227
// <th> must auto-close <td>, making them siblings per the HTML spec
228228
expect(onclosetag).toHaveBeenCalledWith("td", true);
229229
const tdClose = onclosetag.mock.calls.findIndex(
230-
([name]: [string]) => name === "td",
230+
([name]) => name === "td",
231231
);
232232
const thOpen = onopentagname.mock.calls.findIndex(
233-
([name]: [string]) => name === "th",
233+
([name]) => name === "th",
234234
);
235235
expect(tdClose).toBeLessThan(thOpen);
236236
});

0 commit comments

Comments
 (0)