31 Commits

Author SHA1 Message Date
Panagiotis Papadopoulos
ecf1a0e4ad refactor(utils): add safeExtractMessageAndStackFromError util to remove code duplication 2025-03-08 17:07:25 +01:00
Panagiotis Papadopoulos
2beaaa95bf chore(prettier): fix code style 2025-03-02 20:47:57 +01:00
Elian Doran
4e876ed24d
fix(build): build errors after changing meta data type 2025-02-22 12:52:25 +02:00
Panagiotis Papadopoulos
e710409134 test(server/utils): remove completed TODO 2025-02-01 15:10:31 +01:00
Panagiotis Papadopoulos
08c32da0d2 test(server/utils): fix warnings and explicitly await timeLimit tests 2025-02-01 15:06:07 +01:00
Panagiotis Papadopoulos
13e72c5e0a test(server/utils): add basic test for toObject 2025-02-01 15:00:47 +01:00
Panagiotis Papadopoulos
5c904f100a test(server/utils): add prettier ignore statement to avoid newlines getting mangled 2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
4917296d96 test(server/utils): add basic test for deferred
this needs to be expanded, but I don't fully understand
what the exact purpose is of this deferred fn
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
e1795a0ad1 test(server/utils): add tests for toMap 2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
f0ba056bb7 test(server/utils): add tests for escapeHtml & unescapeHtml 2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
72f0de6b78 test(server/utils): add todo remarks 2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
9f2dd21865 test(server/utils): add tests for randomSecureToken
(bit ugly I have to say, as we are essentially partially testing "crypto" module here,
probably should be instead replaced by a version that mocks crypto module and checks, if the called functions match the expectations)
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
46f28f4f09 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
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
c3587ad536 test(server/utils): add tests for getNoteTitle 2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
b812e67794 test(server/utils): adapt tests for getContentDisposition
since we merged these functions, adapt the previous tests of sanitizeFilenameForHeader and use them for the newly merged function getContentDisposition
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
acb7098bb8 test(server/utils): add tests for sanitizeFilenameForHeader 2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
9eeedc827c test(server/utils): add tests for timeLimit 2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
3094b1779e test(server/utils): add tests for isStringNote 2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
5c20a6d5ee test(server/utils): add tests for isDev 2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
de5ffb591d test(server/utils): add tests for isMac/isWindows/isElectron 2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
81db681732 refactor(server/utils): remove unused union
function is not used at all anywhere
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
45cf0334f1 test(server/utils): add tests for stripTags 2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
738436061c test(server/utils): add tests for removeDiacritic and normalize 2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
92123e1761 refactor(server/utils): get rid of isString
let's use typeof x === "string" → works exactly the same and at the same speed as this custom isString fn
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
41c96fb202 test(server/utils): add tests for envToBoolean 2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
9689222fd4 test(server/utils): add tests for removeTextFileExtension 2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
05a0acbdb5 test(server/utils): add tests for newEntityId
and randomString
2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
33346e0cee test(server/utils): add tests for sanitizeSqlIdentifier 2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
8546fe2333 test(server/utils): add tests for isEmptyOrWhitespace 2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
e6f5321444 test(server/utils): move formatDownloadTitle tests to spec file 2025-02-01 14:37:12 +01:00
Panagiotis Papadopoulos
668cc7e1a4 test(import/utils): prepare spec file 2025-02-01 14:37:12 +01:00