Skip to content

Build your personal knowledge base with Trilium Notes

fix(test): one more broken test

Elian Doranc27f13d49f13
diff --git a/src/share/routes.spec.ts b/src/share/routes.spec.ts
index c78e447af3..3c86a3f2f1 100644
--- a/src/share/routes.spec.ts
+++ b/src/share/routes.spec.ts
@@ -27,7 +27,7 @@ describe("Share API test", () => {
it("requests password for password-protected share", async () => {
await supertest(app)
.get("/share/YjlPRj2E9fOV")
- .expect(200)
+ .expect(401)
.expect("WWW-Authenticate", 'Basic realm="User Visible Realm", charset="UTF-8"');
expect(cannotSetHeadersCount).toBe(0);
});
diff --git a/src/share/routes.ts b/src/share/routes.ts
index 2591cce0cf..9b6c2201d6 100644
--- a/src/share/routes.ts
+++ b/src/share/routes.ts
@@ -216,7 +216,6 @@ function register(router: Router) {
const { shareId } = req.params;
- console.log("Got share ", shareId, shaca.notes, shaca.aliasToNote);
const note = shaca.aliasToNote[shareId] || shaca.notes[shareId];
renderNote(note, req, res);