Files
pleno-vue/tests/unit/self-serve-services.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

23 lines
802 B
JavaScript

import { readFileSync } from "node:fs";
import { join } from "node:path";
import { describe, expect, it } from "vitest";
const filePath = join(process.cwd(), "src/components/session/token/SessionUser/Objects/SelfServeTasks.vue");
const source = readFileSync(filePath, "utf8");
describe("self-serve services regression", () => {
it("keeps services column as multi-select", () => {
expect(source).toContain("services:");
expect(source).toContain('type: "multi-select"');
});
it("keeps MACHINE as a selectable service option", () => {
expect(source).toContain('{ id: "MACHINE", name: "MACHINE" }');
});
it("keeps fallback display for empty services", () => {
expect(source).toContain('return "Ingen";');
expect(source).toContain('return services.join(", ");');
});
});