Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(format): fix auto-fixable format issues in data_dir.spec.ts
Panagiotis Papadopoulos2112bbee0a73
diff --git a/src/services/data_dir.spec.ts b/src/services/data_dir.spec.tsindex 24315a5ff8..f04f16ca02 100644--- a/src/services/data_dir.spec.ts+++ b/src/services/data_dir.spec.ts@@ -64,17 +64,17 @@ describe("data_dir.ts unit tests", async () => {type TestCaseGetPlatformAppDataDir = [description: string, fnValue: Parameters<typeof getPlatformAppDataDir>, expectedValue: string | null, osHomedirMockValue: string | null];const testCases: TestCaseGetPlatformAppDataDir[] = [- ["w/ unsupported OS it should return 'null'", ["aix", undefined], null, null],+ [ "w/ unsupported OS it should return 'null'", [ "aix", undefined ], null, null ],- ["w/ win32 and no APPDATA set it should return 'null'", ["win32", undefined], null, null],+ [ "w/ win32 and no APPDATA set it should return 'null'", [ "win32", undefined ], null, null ],- ["w/ win32 and set APPDATA it should return set 'APPDATA'", ["win32", "AppData"], "AppData", null],+ [ "w/ win32 and set APPDATA it should return set 'APPDATA'", [ "win32", "AppData" ], "AppData", null ],- ["w/ linux it should return '~/.local/share'", ["linux", undefined], "/home/mock/.local/share", "/home/mock"],+ [ "w/ linux it should return '~/.local/share'", [ "linux", undefined ], "/home/mock/.local/share", "/home/mock" ],- ["w/ linux and wrongly set APPDATA it should ignore APPDATA and return '~/.local/share'", ["linux", "FakeAppData"], "/home/mock/.local/share", "/home/mock"],+ [ "w/ linux and wrongly set APPDATA it should ignore APPDATA and return '~/.local/share'", [ "linux", "FakeAppData" ], "/home/mock/.local/share", "/home/mock" ],- ["w/ darwin it should return '~/Library/Application Support'", ["darwin", undefined], "/Users/mock/Library/Application Support", "/Users/mock"]+ [ "w/ darwin it should return '~/Library/Application Support'", [ "darwin", undefined ], "/Users/mock/Library/Application Support", "/Users/mock" ]];beforeEach(() => {@@ -83,7 +83,7 @@ describe("data_dir.ts unit tests", async () => {});testCases.forEach((testCase) => {- const [testDescription, fnValues, expected, osHomedirMockValue] = testCase;+ const [ testDescription, fnValues, expected, osHomedirMockValue ] = testCase;return it(testDescription, () => {mockFn.osHomedirMock.mockReturnValue(osHomedirMockValue);const actual = getPlatformAppDataDir(...fnValues);@@ -272,7 +272,7 @@ describe("data_dir.ts unit tests", async () => {});describe("#getDataDirs()", () => {- const envKeys: Omit<keyof ReturnType<typeof getDataDirs>, "TRILIUM_DATA_DIR">[] = ["DOCUMENT_PATH", "BACKUP_DIR", "LOG_DIR", "ANONYMIZED_DB_DIR", "CONFIG_INI_PATH", "TMP_DIR"];+ const envKeys: Omit<keyof ReturnType<typeof getDataDirs>, "TRILIUM_DATA_DIR">[] = [ "DOCUMENT_PATH", "BACKUP_DIR", "LOG_DIR", "ANONYMIZED_DB_DIR", "CONFIG_INI_PATH", "TMP_DIR" ];const setMockedEnv = (prefix: string | null) => {envKeys.forEach((key) => {