mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 23:05:51 +01:00
Merge pull request #977 from pano9000/test_vitest
test: add vitest as test framework and port current tests
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { describe, it, expect } from "vitest";
|
||||
import markdownExportService from "./md.js";
|
||||
import { trimIndentation } from "../../../spec/support/utils.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { describe, it, expect } from "vitest";
|
||||
import { trimIndentation } from "../../../spec/support/utils.js";
|
||||
import markdownService from "./markdown.js";
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { describe, it, expect } from "vitest";
|
||||
import { renderCode, type Result } from "./content_renderer.js";
|
||||
|
||||
describe("content_renderer", () => {
|
||||
@@ -8,7 +9,7 @@ describe("content_renderer", () => {
|
||||
content: " "
|
||||
};
|
||||
renderCode(emptyResult);
|
||||
expect(emptyResult.isEmpty).toBeTrue();
|
||||
expect(emptyResult.isEmpty).toBeTruthy();
|
||||
});
|
||||
|
||||
it("identifies unsupported content type", () => {
|
||||
@@ -17,7 +18,7 @@ describe("content_renderer", () => {
|
||||
content: Buffer.from("Hello world")
|
||||
};
|
||||
renderCode(emptyResult);
|
||||
expect(emptyResult.isEmpty).toBeTrue();
|
||||
expect(emptyResult.isEmpty).toBeTruthy();
|
||||
});
|
||||
|
||||
it("wraps code in <pre>", () => {
|
||||
|
||||
Reference in New Issue
Block a user