From 8ef586f93067670720934219f670733dd803c651 Mon Sep 17 00:00:00 2001 From: Axel Meyer Date: Sat, 16 May 2026 01:16:30 +0200 Subject: [PATCH] feat(maps-test): migrate to test-lib (manifest.lib + run_tests) (Test-Opt Phase 3.1) Per ADR-0037 Tests-as-Libs Convention. - manifest.module -> manifest.lib with role: 'test' - init(ctx) -> M.run_tests(ctx) entry-point export - No assertion-body change Repo renamed on Gitea: sporel-module-lib-core.maps-test -> sporel-lib-core.maps-test Local moved: sporel-modules/lib-core.maps-test/ -> sporel-libs/lib-core/maps-test/ History preserved. --- init.lua | 8 ++++++-- manifest.module => manifest.lib | 5 ++--- 2 files changed, 8 insertions(+), 5 deletions(-) rename manifest.module => manifest.lib (63%) diff --git a/init.lua b/init.lua index 7035fce..431b015 100644 --- a/init.lua +++ b/init.lua @@ -1,11 +1,13 @@ -- ===================================================================== --- lib-core.maps-test — Reference test-module (P.3.1) +-- lib-core.maps-test — Reference test-lib (P.3.1) -- Validates lib-core.maps API contracts via engine.test.* assertions. -- See: meta/docs/superpowers/specs/2026-05-10-test-module-pattern-design.md -- ===================================================================== local maps = require("lib-core.maps") -function init(ctx) +local M = {} + +function M.run_tests(ctx) -- Setup local demo_map = maps.load("maps/demo.map.json") maps.set_current(demo_map) @@ -35,3 +37,5 @@ function init(ctx) engine.exit(engine.test.failures()) end + +return M diff --git a/manifest.module b/manifest.lib similarity index 63% rename from manifest.module rename to manifest.lib index b4abd0d..4862a7f 100644 --- a/manifest.module +++ b/manifest.lib @@ -1,9 +1,8 @@ { "id": "lib-core.maps-test", - "kind": "test-module", + "role": "test", "version": "0.1.0", - "api": "^0.1", - "entry_point": "init.lua", + "api_min": "0.1", "deps": [ {"id": "lib-core.maps", "version": "0.1.1"} ]