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.
This commit is contained in:
8
init.lua
8
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.
|
-- Validates lib-core.maps API contracts via engine.test.* assertions.
|
||||||
-- See: meta/docs/superpowers/specs/2026-05-10-test-module-pattern-design.md
|
-- See: meta/docs/superpowers/specs/2026-05-10-test-module-pattern-design.md
|
||||||
-- =====================================================================
|
-- =====================================================================
|
||||||
local maps = require("lib-core.maps")
|
local maps = require("lib-core.maps")
|
||||||
|
|
||||||
function init(ctx)
|
local M = {}
|
||||||
|
|
||||||
|
function M.run_tests(ctx)
|
||||||
-- Setup
|
-- Setup
|
||||||
local demo_map = maps.load("maps/demo.map.json")
|
local demo_map = maps.load("maps/demo.map.json")
|
||||||
maps.set_current(demo_map)
|
maps.set_current(demo_map)
|
||||||
@@ -35,3 +37,5 @@ function init(ctx)
|
|||||||
|
|
||||||
engine.exit(engine.test.failures())
|
engine.exit(engine.test.failures())
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
{
|
{
|
||||||
"id": "lib-core.maps-test",
|
"id": "lib-core.maps-test",
|
||||||
"kind": "test-module",
|
"role": "test",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"api": "^0.1",
|
"api_min": "0.1",
|
||||||
"entry_point": "init.lua",
|
|
||||||
"deps": [
|
"deps": [
|
||||||
{"id": "lib-core.maps", "version": "0.1.1"}
|
{"id": "lib-core.maps", "version": "0.1.1"}
|
||||||
]
|
]
|
||||||
Reference in New Issue
Block a user