summaryrefslogtreecommitdiff
path: root/test_util/src
diff options
context:
space:
mode:
Diffstat (limited to 'test_util/src')
-rw-r--r--test_util/src/lib.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/test_util/src/lib.rs b/test_util/src/lib.rs
index 7c754e02d..a6fb74914 100644
--- a/test_util/src/lib.rs
+++ b/test_util/src/lib.rs
@@ -430,6 +430,19 @@ fn custom_headers(path: warp::path::Peek, f: warp::fs::File) -> Box<dyn Reply> {
let f = with_header(f, "Content-Length", "39");
return Box::new(f);
}
+ if p.contains("cli/tests/encoding/") {
+ let charset = p
+ .split_terminator('/')
+ .last()
+ .unwrap()
+ .trim_end_matches(".ts");
+ let f = with_header(
+ f,
+ "Content-Type",
+ &format!("application/typescript;charset={}", charset)[..],
+ );
+ return Box::new(f);
+ }
let content_type = if p.contains(".t1.") {
Some("text/typescript")