From c6202777d41479d628b0f3ca87ea1bbb93426ca2 Mon Sep 17 00:00:00 2001 From: sigma-andex <77549848+sigma-andex@users.noreply.github.com> Date: Thu, 4 Jan 2024 21:29:46 +0000 Subject: [PATCH] Minor test cleanup --- tests/web.rs | 4 ---- 1 file changed, 4 deletions(-) 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) }