This commit is contained in:
Nikolay Kim 2024-08-13 15:59:15 +05:00
parent ee640ab335
commit f37270eae2
2 changed files with 6 additions and 1 deletions

View file

@ -30,7 +30,7 @@ jobs:
run: cargo +nightly llvm-cov --no-report --all --no-default-features --features="glommio,cookie,url,compress,openssl,rustls,ws,brotli"
- name: Code coverage
run: cargo +nightly llvm-cov --no-report --all --doctests --no-default-features --features="tokio,cookie,url,compress,openssl,rustls,ws,brotli"
run: RUST_LOG=trace cargo +nightly llvm-cov --no-report --all --doctests --no-default-features --features="tokio,cookie,url,compress,openssl,rustls,ws,brotli"
- name: Generate coverage report
run: cargo +nightly llvm-cov report --lcov --output-path lcov.info --ignore-filename-regex="ntex-tokio|ntex-glommio|ntex-async-std"

View file

@ -413,6 +413,11 @@ mod tests {
assert_eq!(j.name, "test");
assert!(format!("{:?}", j).contains("Json"));
assert!(format!("{}", j).contains("test"));
let cfg = JsonConfig::default().content_type(|mime: mime::Mime| {
mime.type_() == mime::TEXT && mime.subtype() == mime::PLAIN
});
assert!(format!("{:?}", cfg).contains("JsonConfig"));
}
#[crate::rt_test]