Files
pleno-vue/tests/unit/edge-gateway-service.spec.js
T
Jeppe Bundgaard b39b458f4f Add .prettierrc.json and refactor test files for improved formatting consistency:
- Introduced `.prettierrc.json` to enforce consistent code formatting across the project.
- Updated unit and e2e test files to address formatting issues, improve readability, and ensure alignment with the new Prettier configuration.
2026-04-13 09:13:27 +02:00

20 lines
1.0 KiB
JavaScript

import { readFileSync } from "node:fs";
import { join } from "node:path";
import { describe, expect, it } from "vitest";
const source = readFileSync(join(process.cwd(), "src/services/edgeGateways.js"), "utf8");
describe("edge gateway service contract", () => {
it("wraps the backend edge gateway REST endpoints", () => {
expect(source).toContain('"/departments"');
expect(source).toContain('"/edge-gateways"');
expect(source).toContain('"/edge-gateways/install-token"');
expect(source).toContain("/edge-gateways/${encodeURIComponent(gatewayId)}/discovery");
expect(source).toContain("/edge-gateways/${encodeURIComponent(gatewayId)}/bindings");
expect(source).toContain("/edge-gateways/${encodeURIComponent(gatewayId)}/update-jobs");
expect(source).toContain("/edge-gateways/${encodeURIComponent(gatewayId)}/shell-sessions");
expect(source).toContain("/edge-gateways/${encodeURIComponent(gatewayId)}/rotate-credentials");
expect(source).toContain("/departments/${encodeURIComponent(departmentId)}/gateway-cutover");
});
});