columbo 0.2.3

Async SSR streaming suspense — render placeholders, stream HTML replacements as futures resolve.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Edge case tests.

use super::*;

#[tokio::test]
async fn no_suspensions() {
  let (ctx, resp) = crate::new();

  drop(ctx);

  let output = collect_stream(resp.into_stream("<p>just a page</p>")).await;
  let doc = parse(&output);

  let paragraphs = select(&doc, "p");
  assert!(!paragraphs.is_empty(), "expected a paragraph element");
  assert!(paragraphs[0].text().any(|t| t.contains("just a page")));
}