Import tests: tests/unit/service-layer
Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { panelService } from "@/api/services/panel-service";
|
||||
|
||||
describe("panelService", () => {
|
||||
it("returns backend-ready response envelopes", async () => {
|
||||
const response = await panelService.dashboard.summary();
|
||||
|
||||
expect(response.error).toBeNull();
|
||||
expect(response.meta.requestId).toMatch(/^req_/);
|
||||
expect(response.data?.account.username).toBe("coaxys");
|
||||
});
|
||||
|
||||
it("filters website data through service methods", async () => {
|
||||
const response = await panelService.websites.list({ search: "docs" });
|
||||
|
||||
expect(response.data).toHaveLength(1);
|
||||
expect(response.data?.[0].domain).toBe("docs.example.com");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user