16 lines
561 B
JavaScript
16 lines
561 B
JavaScript
import { describe, expect, it } from "vitest";
|
|
import { sourceMappings } from "../../scripts/playwright-pr-mapping.mjs";
|
|
|
|
const specsFor = (file) =>
|
|
sourceMappings
|
|
.filter((mapping) => mapping.patterns.some((pattern) => pattern.test(file)))
|
|
.flatMap((mapping) => mapping.specs);
|
|
|
|
describe("Playwright PR mapping", () => {
|
|
it("maps user vehicle table changes to the user vehicles E2E coverage", () => {
|
|
expect(specsFor("src/components/displays/user/vehicles/vehiclesTable.vue")).toContain(
|
|
"tests/e2e/userVehicles.spec.ts"
|
|
);
|
|
});
|
|
});
|