Skip to content

Build your personal knowledge base with Trilium Notes

fix(build): type error due to test

Elian Doran259ce440c5a7
diff --git a/src/public/app/test/setup.ts b/src/public/app/test/setup.ts
index 5165534228..7f3f5aa1b9 100644
--- a/src/public/app/test/setup.ts
+++ b/src/public/app/test/setup.ts
@@ -48,9 +48,9 @@ function mockServer() {
}
},
- async post(url: string, data: {}) {
+ async post(url: string, data: object) {
if (url === "tree/load") {
- throw new Error(`A module tried to load from the server the following notes: ${data.noteIds.join(",")}\nThis is not supported, use Froca mocking instead and ensure the note exist in the mock.`)
+ throw new Error(`A module tried to load from the server the following notes: ${((data as any).noteIds || []).join(",")}\nThis is not supported, use Froca mocking instead and ensure the note exist in the mock.`)
}
}
}