Skip to content

Instantly share code, notes, and snippets.

View cloudydaiyz's full-sized avatar

Kylan Duncan cloudydaiyz

View GitHub Profile
@cloudydaiyz
cloudydaiyz / web-vitals.spec.ts
Last active October 15, 2025 15:06
Using the web-vitals library in playwright browsers
import { test, expect } from "@playwright/test";
import type * as webVitals from 'web-vitals';
import path from 'path';
import fs from 'fs';
declare global {
interface Window {
webVitals: typeof webVitals;
validateMetric: (name: string, good: boolean) => void;
}