test(etapi): port app-info

This commit is contained in:
Elian Doran
2025-06-02 18:08:21 +03:00
parent d9249e3760
commit 053ff0568d
5 changed files with 38 additions and 8 deletions

View File

@@ -0,0 +1,15 @@
import type { Application } from "express";
import supertest from "supertest";
import { expect } from "vitest";
export async function login(app: Application) {
// Obtain auth token.
const response = await supertest(app)
.post("/etapi/auth/login")
.send({
"password": "demo1234"
})
.expect(201);
const token = response.body.authToken;
expect(token).toBeTruthy();
}