feat: finalize the Hemx 0.4 core
CI / test (push) Has been cancelled

This commit is contained in:
tmk241
2026-09-02 17:28:40 +02:00
parent 1dc9734f16
commit a3c72e21db
15 changed files with 96 additions and 231 deletions
+3 -7
View File
@@ -1,7 +1,6 @@
use hemx_core::{
Atom, BuildFingerprint, Effect, EffectBatch, Form, GeneratedTarget, HistoryMode,
InsertPosition, KeyedSlot, PatchMode, ResourceId, ResourceKind, ResourceRef, SafeHtml,
ScopeKey, Slot,
BuildFingerprint, Effect, EffectBatch, Form, GeneratedTarget, HistoryMode, InsertPosition,
KeyedSlot, PatchMode, ResourceId, ResourceKind, ResourceRef, SafeHtml, ScopeKey, Slot,
};
#[derive(Clone, Copy)]
@@ -30,12 +29,10 @@ fn panic_text<T>(result: std::thread::Result<T>) -> String {
#[test]
fn inspects_tuple_effects() {
let count = Slot::<u32>::new(1);
let user = Atom::<String>::new(2);
let inspected = hemx_test::run(|value| (count.text(value), user.set("alice")), 42);
let inspected = hemx_test::run(|value| count.text(value), 42);
assert!(inspected.has_slot(count));
assert!(inspected.has_atom(user));
assert!(inspected.contains(&Effect::Patch {
target: ResourceRef::unscoped(count.id()),
mode: PatchMode::Morph,
@@ -227,7 +224,6 @@ fn inspector_predicates_bind_operation_target_scope_kind_and_payload() {
assert!(!inspected.has_slot(Slot::<()>::new(99)));
assert!(inspected.has_keyed_slot(KeyedSlot::<String, ()>::new(42)));
assert!(!inspected.has_keyed_slot(KeyedSlot::<String, ()>::new(99)));
assert!(!inspected.has_atom(Atom::<()>::new(42)));
assert!(inspected.has_form(form));
assert!(!inspected.has_form(Form::<()>::new(12)));