mirror of
https://github.com/mara-li/obsidian-my-thesaurus.git
synced 2026-07-22 05:38:22 +00:00
feat(tests): add test for error handling with insufficient columns in CSV
This commit is contained in:
parent
df3f1c6dd6
commit
86fcbc23d0
1 changed files with 10 additions and 0 deletions
|
|
@ -137,3 +137,13 @@ describe("Unordered columns", () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe("not enough columns", () => {
|
||||||
|
const csvContent = "Term\nword1,word2";
|
||||||
|
const separator: Separator = ",";
|
||||||
|
it("should error", () => {
|
||||||
|
expect(() =>
|
||||||
|
getThesaurus(csvContent, separator, mockTranslation, columnNames)
|
||||||
|
).toThrow(mockTranslation("error.csv.malformed"));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue