aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js/test')
-rw-r--r--src/bun.js/test/jest.zig3
-rw-r--r--src/bun.js/test/snapshot.zig8
2 files changed, 5 insertions, 6 deletions
diff --git a/src/bun.js/test/jest.zig b/src/bun.js/test/jest.zig
index 77cd79d21..e52c9f0e2 100644
--- a/src/bun.js/test/jest.zig
+++ b/src/bun.js/test/jest.zig
@@ -3,8 +3,7 @@ const bun = @import("root").bun;
const js_parser = bun.js_parser;
const js_ast = bun.JSAst;
const Api = @import("../../api/schema.zig").Api;
-const RequestContext = @import("../../http.zig").RequestContext;
-const MimeType = @import("../../http.zig").MimeType;
+const MimeType = @import("../../bun_dev_http_server.zig").MimeType;
const ZigURL = @import("../../url.zig").URL;
const HTTPClient = @import("root").bun.HTTP;
const NetworkThread = HTTPClient.NetworkThread;
diff --git a/src/bun.js/test/snapshot.zig b/src/bun.js/test/snapshot.zig
index 12c7b3c36..072194b11 100644
--- a/src/bun.js/test/snapshot.zig
+++ b/src/bun.js/test/snapshot.zig
@@ -227,11 +227,11 @@ pub const Snapshots = struct {
if (this.snapshot_dir_path == null or !strings.eqlLong(dir_path, this.snapshot_dir_path.?, true)) {
remain[0] = 0;
const snapshot_dir_path = snapshot_file_path_buf[0 .. snapshot_file_path_buf.len - remain.len :0];
- switch (JSC.Node.Syscall.mkdir(snapshot_dir_path, 0o777)) {
+ switch (bun.sys.mkdir(snapshot_dir_path, 0o777)) {
.result => this.snapshot_dir_path = dir_path,
.err => |err| {
switch (err.getErrno()) {
- std.os.E.EXIST => this.snapshot_dir_path = dir_path,
+ .EXIST => this.snapshot_dir_path = dir_path,
else => return JSC.Maybe(void){
.err = err,
},
@@ -249,7 +249,7 @@ pub const Snapshots = struct {
var flags: JSC.Node.Mode = std.os.O.CREAT | std.os.O.RDWR;
if (this.update_snapshots) flags |= std.os.O.TRUNC;
- const fd = switch (JSC.Node.Syscall.open(snapshot_file_path, flags, 0o644)) {
+ const fd = switch (bun.sys.open(snapshot_file_path, flags, 0o644)) {
.result => |_fd| _fd,
.err => |err| return JSC.Maybe(void){
.err = err,
@@ -258,7 +258,7 @@ pub const Snapshots = struct {
var file: File = .{
.id = file_id,
- .file = .{ .handle = fd },
+ .file = .{ .handle = bun.fdcast(fd) },
};
if (this.update_snapshots) {