Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
test(etapi): port other
Elian Doran4e81be8c76d0
diff --git a/_regroup/test-etapi/other.http b/_regroup/test-etapi/other.httpdeleted file mode 100644index c3f92fc94e..0000000000--- a/_regroup/test-etapi/other.http+++ /dev/null@@ -1,4 +0,0 @@-POST {{triliumHost}}/etapi/refresh-note-ordering/root-Authorization: {{authToken}}--> {% client.assert(response.status === 200); %}\ No newline at end of filediff --git a/apps/server/spec/etapi/other.spec.ts b/apps/server/spec/etapi/other.spec.tsnew file mode 100644index 0000000000..733ab12a60--- /dev/null+++ b/apps/server/spec/etapi/other.spec.ts@@ -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);+ });+});