Skip to content

Commit

Permalink
Experiment part 1.
Browse files Browse the repository at this point in the history
  • Loading branch information
finnbear committed Sep 12, 2024
1 parent 142f863 commit 2a8e264
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/yew-router/tests/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ async fn link_with_basename() {
basename: Some("/bayes/".to_owned()),
});

sleep(Duration::ZERO).await;
for _ in 0..10 {
sleep(Duration::from_millis(100)).await;
}

assert_eq!(
"/bayes/",
Expand All @@ -190,7 +192,9 @@ async fn link_with_basename() {
// Some -> None
handle.update(BasenameProps { basename: None });

sleep(Duration::ZERO).await;
for _ in 0..10 {
sleep(Duration::from_millis(100)).await;
}

assert_eq!("/", gloo::utils::window().location().pathname().unwrap());

Expand All @@ -201,7 +205,9 @@ async fn link_with_basename() {
basename: Some("bass".to_string()),
});

sleep(Duration::ZERO).await;
for _ in 0..10 {
sleep(Duration::from_millis(100)).await;
}

assert_eq!(
"/bass/",
Expand Down

0 comments on commit 2a8e264

Please sign in to comment.