mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
test(etapi): port other
This commit is contained in:
parent
887a7f900c
commit
4e81be8c76
@ -1,4 +0,0 @@
|
|||||||
POST {{triliumHost}}/etapi/refresh-note-ordering/root
|
|
||||||
Authorization: {{authToken}}
|
|
||||||
|
|
||||||
> {% client.assert(response.status === 200); %}
|
|
26
apps/server/spec/etapi/other.spec.ts
Normal file
26
apps/server/spec/etapi/other.spec.ts
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
import { Application } from "express";
|
||||||
|
import { beforeAll, describe, expect, it } from "vitest";
|
||||||
|
import supertest from "supertest";
|
||||||
|
import { login } from "./utils.js";
|
||||||
|
import config from "../../src/services/config.js";
|
||||||
|
|
||||||
|
let app: Application;
|
||||||
|
let token: string;
|
||||||
|
|
||||||
|
const USER = "etapi";
|
||||||
|
|
||||||
|
describe("etapi/refresh-note-ordering/root", () => {
|
||||||
|
beforeAll(async () => {
|
||||||
|
config.General.noAuthentication = false;
|
||||||
|
const buildApp = (await (import("../../src/app.js"))).default;
|
||||||
|
app = await buildApp();
|
||||||
|
token = await login(app);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("refreshes note ordering", async () => {
|
||||||
|
await supertest(app)
|
||||||
|
.post("/etapi/refresh-note-ordering/root")
|
||||||
|
.auth(USER, token, { "type": "basic"})
|
||||||
|
.expect(200);
|
||||||
|
});
|
||||||
|
});
|
Loading…
x
Reference in New Issue
Block a user