From 401a2851c643c5051c75310704cfdc94d6b0a072 Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 14:16:18 +0200 Subject: Compose global state activation --- tests/run.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests') diff --git a/tests/run.lua b/tests/run.lua index 9ccb079..8520d5a 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -10,6 +10,7 @@ local domain = require("clever_f.domain") local action_facade = require("clever_f.action_facade") local acquisition_service = require("clever_f.acquisition_service") local capabilities = require("clever_f.capabilities") +local composition_root = require("clever_f.composition_root") local destination_engine = require("clever_f.destination_engine") local direct_preview_planner = require("clever_f.direct_preview_planner") local feedback_service = require("clever_f.feedback_service") @@ -7071,6 +7072,20 @@ test("Eager cleanup preserves history and finalizer registrations", function() same(nil, state.highlight_timer) end) +test("Core activation owns the plugin-global sequence state", function() + local state = fresh_sequence_state() + local host = MemoryHost.new() + local root = composition_root.new({ host = host }) + local activation = root:activate() + + truthy(composition_root.CompositionRoot.is(root)) + same(state, activation.state) + same(state, root:state()) + same(state, root:transitions():state()) + same(root:coordinator(), root:facade():coordinator()) + same(activation, root:activate()) +end) + test("Primary coordination accepts only the four motion descriptors", function() local coordinator = sequence_coordinator.new({ host = MemoryHost.new() }) for _, value in ipairs({ "f", "F", "t", "T" }) do -- cgit v1.2.3