You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: hydrate.rs
    path of file: ./repos/sycamore/packages/sycamore/tests/web
    
    the code of the file until where you have to start completion: use expect_test::{expect, Expect};

use super::*;

fn check(actual: &str, expect: Expect) {
    expect.assert_eq(actual);
}

mod hello_world {
    use super::*;
    fn v<G: Html>() -> View<G> {
        view! { p { "Hello World!" } }
    }
    #[test]
    fn ssr() {
        check(
            &sycamore::render_to_string(v),
            expect![[r#"<p data-hk="0.0">Hel
    
    fn test() {
        let html = sycamore::render_to_string(|| v(*create_signal(view! { "text" })));
        let c = test_container();
        c.set_inner_html(&html);

        let _ = create_root(|| {
            let state = create_signal(view! { "text" });

            sycamore::hydrate_in_scope(|| v(*state), &c);

            // Reactivity should work normally.
            state.set(view! { span { "nested node" } });
            assert_text_content!(query("p"), "beforenested nodeafter");

            // P tag should still be the SSR-ed node, not a new node.
            assert_eq!(query("p").get_attribute("data-hk").as_deref(), Some("0.0"));
        });
    }