mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-09 09:42:28 +08:00
21 lines
614 B
TypeScript
21 lines
614 B
TypeScript
![]() |
import { beforeAll, describe, it } from "vitest";
|
||
|
import supertest from "supertest";
|
||
|
import type { App } from "supertest/types.js";
|
||
|
import { initializeTranslations } from "../services/i18n.js";
|
||
|
|
||
|
let app: App;
|
||
|
|
||
|
describe("Share API test", () => {
|
||
|
beforeAll(async () => {
|
||
|
initializeTranslations();
|
||
|
app = (await import("../app.js")).default;
|
||
|
});
|
||
|
|
||
|
it("requests password for password-protected share", async () => {
|
||
|
await supertest(app)
|
||
|
.get("/share/YjlPRj2E9fOV")
|
||
|
.expect("WWW-Authenticate", 'Basic realm="User Visible Realm", charset="UTF-8"');
|
||
|
});
|
||
|
|
||
|
});
|