aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bunfig.zig8
-rw-r--r--src/cli.zig2
2 files changed, 10 insertions, 0 deletions
diff --git a/src/bunfig.zig b/src/bunfig.zig
index f840c7c58..10a35edd4 100644
--- a/src/bunfig.zig
+++ b/src/bunfig.zig
@@ -191,6 +191,14 @@ pub const Bunfig = struct {
}
}
+ if (comptime cmd == .TestCommand) {
+ if (json.get("test")) |test_| {
+ if (test_.get("root")) |root| {
+ this.ctx.debug.test_directory = root.asString(this.allocator) orelse "";
+ }
+ }
+ }
+
if (comptime cmd.isNPMRelated() or cmd == .RunCommand or cmd == .AutoCommand) {
if (json.get("install")) |_bun| {
var install: *Api.BunInstall = this.ctx.install orelse brk: {
diff --git a/src/cli.zig b/src/cli.zig
index f18ce68ee..34677308d 100644
--- a/src/cli.zig
+++ b/src/cli.zig
@@ -838,6 +838,8 @@ pub const Command = struct {
macros: ?MacroMap = null,
editor: string = "",
package_bundle_map: bun.StringArrayHashMapUnmanaged(options.BundlePackage) = bun.StringArrayHashMapUnmanaged(options.BundlePackage){},
+
+ test_directory: []const u8 = "",
};
pub const Context = struct {