mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 21:36:05 +01:00
test: port spec-es6 tests to vitest
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { expect, describe, it } from "vitest";
|
||||
import { formatDownloadTitle } from "../../src/services/utils.ts";
|
||||
import { describe, it, execute, expect } from "../mini_test.ts";
|
||||
|
||||
const testCases: [fnValue: Parameters<typeof formatDownloadTitle>, expectedValue: ReturnType<typeof formatDownloadTitle>][] = [
|
||||
// empty fileName tests
|
||||
@@ -55,9 +55,7 @@ describe("utils/formatDownloadTitle unit tests", () => {
|
||||
return it(`With args '${JSON.stringify(testCase[0])}' it should return '${testCase[1]}'`, () => {
|
||||
const [value, expected] = testCase;
|
||||
const actual = formatDownloadTitle(...value);
|
||||
expect(actual).toEqual(expected);
|
||||
expect(actual).toStrictEqual(expected);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
execute();
|
||||
});
|
||||
Reference in New Issue
Block a user