Skip to content

Build your personal knowledge base with Trilium Notes

test(script): clean up setup

Elian Doranddd99fac5225
diff --git a/apps/server/src/services/script.spec.ts b/apps/server/src/services/script.spec.ts
index cfc0b14e4a..06fa02e967 100644
--- a/apps/server/src/services/script.spec.ts
+++ b/apps/server/src/services/script.spec.ts
@@ -2,10 +2,7 @@ import { trimIndentation } from "@triliumnext/commons";
import { beforeEach, describe, expect, it, vi } from "vitest";
import becca from "../becca/becca.js";
-import BBranch from "../becca/entities/bbranch.js";
-import BNote from "../becca/entities/bnote.js";
import { buildNote } from "../test/becca_easy_mocking.js";
-import { NoteBuilder } from "../test/becca_mocking.js";
import cls from "./cls.js";
import { buildJsx, executeBundle, getScriptBundle } from "./script.js";
@@ -14,19 +11,7 @@ describe("Script", () => {
becca.reset();
- new NoteBuilder(
- new BNote({
- noteId: "root",
- title: "root",
- type: "text"
- })
- );
- new BBranch({
- branchId: "none_root",
- noteId: "root",
- parentNoteId: "none",
- notePosition: 10
- });
+ buildNote({ id: "root", title: "root" });
vi.mock("./sql.js", () => {
return {