refactor: take improvements from the edge browser (#289)

This commit is contained in:
sigoden
2023-11-15 19:44:44 +08:00
committed by GitHub
parent 743db47f90
commit c352dab470
5 changed files with 31 additions and 15 deletions

View File

@@ -32,7 +32,7 @@ fn asset_js(server: TestServer) -> Result<(), Error> {
assert_eq!(resp.status(), 200);
assert_eq!(
resp.headers().get("content-type").unwrap(),
"application/javascript"
"application/javascript; charset=UTF-8"
);
Ok(())
}
@@ -46,7 +46,10 @@ fn asset_css(server: TestServer) -> Result<(), Error> {
);
let resp = reqwest::blocking::get(url)?;
assert_eq!(resp.status(), 200);
assert_eq!(resp.headers().get("content-type").unwrap(), "text/css");
assert_eq!(
resp.headers().get("content-type").unwrap(),
"text/css; charset=UTF-8"
);
Ok(())
}
@@ -90,7 +93,7 @@ fn asset_js_with_prefix(
assert_eq!(resp.status(), 200);
assert_eq!(
resp.headers().get("content-type").unwrap(),
"application/javascript"
"application/javascript; charset=UTF-8"
);
Ok(())
}