Enable BUN_OVERRIDE_MODULE_PATH in bun wiptest

This commit is contained in:
Jarred Sumner
2022-10-28 18:07:00 -07:00
parent 619d931568
commit 8bb080fc7c

View File

@@ -331,6 +331,13 @@ pub const TestCommand = struct {
try vm.bundler.configureDefines();
vm.bundler.options.rewrite_jest_for_tests = true;
if (vm.bundler.env.map.get("BUN_OVERRIDE_MODULE_PATH")) |override_path| {
if (override_path.len > 0) {
vm.load_builtins_from_path = override_path;
}
}
var scanner = Scanner{
.dirs_to_scan = Scanner.Fifo.init(ctx.allocator),
.options = &vm.bundler.options,