diff options
author | Luca Casonato <lucacasonato@yahoo.com> | 2020-08-03 14:55:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-03 14:55:03 +0200 |
commit | 9d50c5c1a6fbe6895b6a63dadcba7bacaf9dd578 (patch) | |
tree | 65d9a7c1899aa8844b2ee89b0991cc724095a580 /test_util/src | |
parent | d54d4d21bddf0fe80a6f534ec945c655595c5f71 (diff) |
feat: hash file names in gen cache (#6911)
Diffstat (limited to 'test_util/src')
-rw-r--r-- | test_util/src/lib.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test_util/src/lib.rs b/test_util/src/lib.rs index a6dc47872..7c754e02d 100644 --- a/test_util/src/lib.rs +++ b/test_util/src/lib.rs @@ -354,6 +354,17 @@ pub async fn run_all_servers() { HeaderValue::from_static("application/javascript"), ); res + })) + .or(warp::path!("cli"/"tests"/"subdir"/"file_with_:_in_name.ts").map(|| { + let mut res = Response::new(Body::from( + "console.log('Hello from file_with_:_in_name.ts');", + )); + let h = res.headers_mut(); + h.insert( + "Content-type", + HeaderValue::from_static("application/typescript"), + ); + res })); let content_type_handler = warp::any() |