mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	Merge pull request #1602 from TriliumNext/chore_format_tests
chore(format): format .spec files
This commit is contained in:
		| @@ -181,14 +181,14 @@ describe("#getContentDisposition", () => { | |||||||
|             [ "test file.csv" ], |             [ "test file.csv" ], | ||||||
|             `file; filename="test%20file.csv"; filename*=UTF-8''test%20file.csv` |             `file; filename="test%20file.csv"; filename*=UTF-8''test%20file.csv` | ||||||
|         ] |         ] | ||||||
|     ] |     ]; | ||||||
|  |  | ||||||
|     testCases.forEach(testCase => { |     testCases.forEach(testCase => { | ||||||
|         const [ desc, fnParams, expected ] = testCase; |         const [ desc, fnParams, expected ] = testCase; | ||||||
|         it(desc, () => { |         it(desc, () => { | ||||||
|             const result = utils.getContentDisposition(...fnParams); |             const result = utils.getContentDisposition(...fnParams); | ||||||
|             expect(result).toStrictEqual(expected); |             expect(result).toStrictEqual(expected); | ||||||
|         }) |         }); | ||||||
|     }); |     }); | ||||||
| }); | }); | ||||||
|  |  | ||||||
| @@ -224,7 +224,7 @@ describe("#isStringNote", () => { | |||||||
|             "w/ non-string note type (file), but mime type starting with 'text/', it should return true", |             "w/ non-string note type (file), but mime type starting with 'text/', it should return true", | ||||||
|             [ "file", "text/html" ], |             [ "file", "text/html" ], | ||||||
|             true |             true | ||||||
|         ], |         ] | ||||||
|     ]; |     ]; | ||||||
|  |  | ||||||
|     testCases.forEach((testCase) => { |     testCases.forEach((testCase) => { | ||||||
| @@ -515,7 +515,7 @@ describe("#safeExtractMessageAndStackFromError", () => { | |||||||
|         expect(actual[0]).toBe("Unknown Error"); |         expect(actual[0]).toBe("Unknown Error"); | ||||||
|         expect(actual[1]).toBeUndefined(); |         expect(actual[1]).toBeUndefined(); | ||||||
|     }); |     }); | ||||||
| }) | }); | ||||||
|  |  | ||||||
| describe("#formatDownloadTitle", () => { | describe("#formatDownloadTitle", () => { | ||||||
|     //prettier-ignore |     //prettier-ignore | ||||||
|   | |||||||
| @@ -13,7 +13,7 @@ describe("Share API test", () => { | |||||||
|         initializeTranslations(); |         initializeTranslations(); | ||||||
|         app = (await import("../app.js")).default; |         app = (await import("../app.js")).default; | ||||||
|         app.use((err: unknown, req: Request, res: Response, next: NextFunction) => { |         app.use((err: unknown, req: Request, res: Response, next: NextFunction) => { | ||||||
|             const [errMessage] = safeExtractMessageAndStackFromError(err) |             const [ errMessage ] = safeExtractMessageAndStackFromError(err); | ||||||
|             if (errMessage.includes("Cannot set headers after they are sent to the client")) { |             if (errMessage.includes("Cannot set headers after they are sent to the client")) { | ||||||
|                 cannotSetHeadersCount++; |                 cannotSetHeadersCount++; | ||||||
|             } |             } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user