UNPKG

cfg-test

Version:

In-source testing using Node.js Test Runner

14 lines (11 loc) 258 B
import type { LoadHook } from "node:module"; export const load: LoadHook = function dtsLoader(url, _, next) { if (url.endsWith(".d.ts")) { return { format: "module", source: "", shortCircuit: true, }; } return next(url); };