Clone in a terminal:
Commit 92b1f06
Johan Mattsson - 2026-07-12T19:52:04+00:00
92b1f0660925ba58389fd3cfcf6b9672e2510d5cjohan.mattsson.m@gmail.com

Clean up test

Changed files (1)

Diff

diff --git a/tests/component.rs b/tests/component.rsindex 70d5f69..e4acd05 100644--- a/tests/component.rs+++ b/tests/component.rs@@ -49,15 +49,15 @@ fn test_custom_id() {     setup_test();      let content = html! {{-        <test-component2 id="custom-id"></test-component2>+        <test-component1 id="custom-id"></test-component1>     }};      try_inner_html("#test-div", &content); -    let element = get_element("test-component2").unwrap();+    let element = get_element("test-component1").unwrap();     assert_eq!(element.id(), "custom-id"); -    let component = TestComponent2::get_component("custom-id").unwrap();+    let component = TestComponent1::get_component("custom-id").unwrap();     let test_component = component.borrow();     assert!(test_component.tested); }@@ -74,17 +74,3 @@ impl Component for TestComponent1 {         test_component.tested = true;     } }--#[component("test-component2")]-struct TestComponent2 {-    tested: bool,-}--impl Component for TestComponent2 {-    fn connected(id: &str) {-        log!("connected TestComponent2:", id);-        let component = TestComponent2::get_component(id).unwrap();-        let mut test_component = component.borrow_mut();-        test_component.tested = true;-    }-}

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112