Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

664 B
Raw Blame
const PLAYWRIGHT_LIST_LINE = /^\s*\[([^\]]+)\] › (.+?\.spec\.ts):\d+:\d+ › (.+)$/;

// Playwright's transform cache can report the same test at its authored line
// on one --list process and at a transformed line on the next. Source
// coordinates are presentation metadata, not test identity; tier accounting
// is project + spec + title.
export function parsePlaywrightTestIdentity(rawLine) {
  const line = rawLine.replace(/\x1b\[[0-9;]*m/g, '');
  const match = line.match(PLAYWRIGHT_LIST_LINE);
  if (!match) return null;

  const [, project, specFile, title] = match;
  return {
    key: `[${project}] › ${specFile} › ${title}`,
    specFile,
  };
}