mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 10:22:29 +08:00
test(server/utils): add edge case test for getNoteTitle
when the noteMeta title consists of just spaces, it should fall back to "normal" handling again → currently this fails
This commit is contained in:
parent
65be2cf048
commit
46f28f4f09
@ -270,6 +270,12 @@ describe("#getNoteTitle", () => {
|
||||
//@ts-expect-error - passing in incomplete noteMeta - but we only care about the title prop here
|
||||
["test_file.md", true, { title: ""}],
|
||||
"test file"
|
||||
],
|
||||
[
|
||||
"when a noteMeta object is passed, but the title prop is empty, it should try to handle the filename as if no noteMeta was passed",
|
||||
//@ts-expect-error - passing in incomplete noteMeta - but we only care about the title prop here
|
||||
["test_file.json", false, { title: " "}],
|
||||
"test_file.json"
|
||||
]
|
||||
];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user