mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-10-27 18:22:45 +08:00
Merge pull request #1602 from TriliumNext/chore_format_tests
chore(format): format .spec files
This commit is contained in:
commit
39d466caf8
@ -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++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user