mirror of
https://github.com/oven-sh/bun
synced 2026-02-13 20:39:05 +00:00
[bun:test] Implement test.root configuration option
This commit is contained in:
@@ -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: {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user