Skip to content

Instantly share code, notes, and snippets.

@oliverjohns
oliverjohns / agent-reporter.ts
Created May 4, 2026 07:58
Playwright custom reporter for LLM coding agents that outputs "copy prompt" equivalent info to stdout (error details, page, git diff)
import { readFile } from 'node:fs/promises';
import type {
FullConfig,
FullResult,
Location,
Reporter,
Suite,
TestCase,
TestError,
@oliverjohns
oliverjohns / recursivelyConvertNamedImportsIntoPathImports.js
Last active December 18, 2022 14:38
Recursively convert all named imports into path imports in a typescript project for a specific library
const fs = require('fs');
const path = require('path');
/* Replace named imports with path imports
E.g turn this:
import { Container, Grid, Typography } from '@mui/material';
into this: