Skip to content

Commit ce85fa5

Browse files
committed
wpt: allow mjs serve through test web server
1 parent 447ef83 commit ce85fa5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/TestHTTPServer.zig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ fn getContentType(file_path: []const u8) []const u8 {
100100
return "application/json";
101101
}
102102

103+
if (std.mem.endsWith(u8, file_path, ".mjs")) {
104+
// mjs are ECMAScript modules
105+
return "application/json";
106+
}
107+
103108
if (std.mem.endsWith(u8, file_path, ".html")) {
104109
return "text/html";
105110
}

0 commit comments

Comments
 (0)