diff --git a/tests/web.rs b/tests/web.rs index 7b476f5..9eff23e 100644 --- a/tests/web.rs +++ b/tests/web.rs @@ -21,14 +21,11 @@ async fn fetch(url: &str) -> Result { opts.method("GET"); opts.mode(RequestMode::Cors); - // let url = "http://localhost:45678/tokenizer.json"; - let request = Request::new_with_str_and_init(&url, &opts)?; let window = web_sys::window().unwrap(); let resp_value = JsFuture::from(window.fetch_with_request(&request)).await?; - // `resp_value` is a `Response` object. assert!(resp_value.is_instance_of::()); let resp: Response = resp_value.dyn_into().unwrap(); @@ -38,7 +35,6 @@ async fn fetch(url: &str) -> Result { async fn load_json(url: &str) -> Result { let response = fetch(url).await?; let json = JsFuture::from(response.json()?).await?; - Ok(json) }