Write test to check basic functionality of UrlBundle::from_root_domain()

This commit is contained in:
bitfl0wer 2023-12-03 13:29:38 +01:00
parent c835bf1123
commit b246e08aca
1 changed files with 12 additions and 0 deletions

12
tests/urlbundle.rs Normal file
View File

@ -0,0 +1,12 @@
use chorus::UrlBundle;
#[cfg(target_arch = "wasm32")]
use wasm_bindgen_test::*;
#[cfg(target_arch = "wasm32")]
wasm_bindgen_test_configure!(run_in_browser);
#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test::wasm_bindgen_test)]
#[cfg_attr(not(target_arch = "wasm32"), tokio::test)]
async fn test_parse_url() {
let url = url::Url::parse("http://localhost:3001/").unwrap();
UrlBundle::from_root_domain(url.as_str()).await.unwrap();
}