import { pathToFileURL } from 'node:url'; import { resolve as pathResolve } from 'node:path'; const shim = pathToFileURL( pathResolve( 'test/shim-better-sqlite3.mjs' ) ).href; export async function resolve( specifier, context, next ) { if ( specifier === 'better-sqlite3' ) { return { url: shim, shortCircuit: true }; } return next( specifier, context ); }