mirror of
https://github.com/anomalyco/opentui.git
synced 2026-09-19 01:26:03 +08:00
17 lines
372 B
JavaScript
17 lines
372 B
JavaScript
|
|
import { registerHooks } from "node:module"
|
||
|
|
|
||
|
|
const bunTestUrl = new URL("../.node-test/src/testing/bun-test-node.js", import.meta.url).href
|
||
|
|
|
||
|
|
registerHooks({
|
||
|
|
resolve(specifier, context, nextResolve) {
|
||
|
|
if (specifier === "bun:test") {
|
||
|
|
return {
|
||
|
|
shortCircuit: true,
|
||
|
|
url: bunTestUrl,
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
return nextResolve(specifier, context)
|
||
|
|
},
|
||
|
|
})
|