- 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.
23 lines
802 B
JavaScript
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(", ");');
|
|
});
|
|
});
|