diff options
author | 2022-09-16 00:53:03 -0700 | |
---|---|---|
committer | 2022-09-16 00:53:03 -0700 | |
commit | 0ce709d96abb48c747f5c93033c9a80fe79ee3bc (patch) | |
tree | f535a53c23fd95154b36ceab7c38c8e3a0275c89 /src/cli/test_command.zig | |
parent | fd808dec524c60ba18c620e27b205828760a6e41 (diff) | |
download | bun-0ce709d96abb48c747f5c93033c9a80fe79ee3bc.tar.gz bun-0ce709d96abb48c747f5c93033c9a80fe79ee3bc.tar.zst bun-0ce709d96abb48c747f5c93033c9a80fe79ee3bc.zip |
Make new HTTP client more stable
Diffstat (limited to 'src/cli/test_command.zig')
-rw-r--r-- | src/cli/test_command.zig | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/cli/test_command.zig b/src/cli/test_command.zig index 92691fa05..1f3ea95cb 100644 --- a/src/cli/test_command.zig +++ b/src/cli/test_command.zig @@ -36,6 +36,7 @@ var path_buf: [bun.MAX_PATH_BYTES]u8 = undefined; var path_buf2: [bun.MAX_PATH_BYTES]u8 = undefined; const PathString = bun.PathString; const is_bindgen = std.meta.globalOption("bindgen", bool) orelse false; +const HTTPThread = @import("http").HTTPThread; const JSC = @import("javascript_core"); const Jest = JSC.Jest; @@ -296,6 +297,7 @@ pub const TestCommand = struct { }; JSC.C.JSCInitialize(); NetworkThread.init() catch {}; + HTTPThread.init() catch {}; var reporter = try ctx.allocator.create(CommandLineReporter); reporter.* = CommandLineReporter{ .jest = TestRunner{ @@ -443,10 +445,6 @@ pub const TestCommand = struct { Output.flush(); var promise = try vm.loadEntryPoint(resolution.path_pair.primary.text); - while (promise.status(vm.global.vm()) == .Pending) { - vm.tick(); - } - switch (promise.status(vm.global.vm())) { .Rejected => { var result = promise.result(vm.global.vm()); |