chore(test/client): wrong path to docs

This commit is contained in:
Elian Doran 2025-04-29 10:57:15 +03:00
parent 32bc24b4c8
commit 50d1d4fae1
No known key found for this signature in database

View File

@ -2,6 +2,7 @@ import { describe, expect, it } from "vitest";
import { byBookType, byNoteType } from "./help_button.js"; import { byBookType, byNoteType } from "./help_button.js";
import fs from "fs"; import fs from "fs";
import type { HiddenSubtreeItem } from "@triliumnext/commons"; import type { HiddenSubtreeItem } from "@triliumnext/commons";
import path from "path";
describe("Help button", () => { describe("Help button", () => {
it("All help notes are accessible", () => { it("All help notes are accessible", () => {
@ -24,7 +25,8 @@ describe("Help button", () => {
...Object.values(byBookType) ...Object.values(byBookType)
].filter((noteId) => noteId) as string[]; ].filter((noteId) => noteId) as string[];
const meta: HiddenSubtreeItem[] = JSON.parse(fs.readFileSync("src/public/app/doc_notes/en/User Guide/!!!meta.json", "utf-8")); const metaPath = path.resolve(path.join(__dirname, "../../../../server/src/public/app/doc_notes/en/User Guide/!!!meta.json"));
const meta: HiddenSubtreeItem[] = JSON.parse(fs.readFileSync(metaPath, "utf-8"));
const allNoteIds = new Set(getNoteIds(meta)); const allNoteIds = new Set(getNoteIds(meta));
for (const helpNote of allHelpNotes) { for (const helpNote of allHelpNotes) {