Files
metabuilder/packages/lua_test/scripts/functions.json
johndoe6345789 8c8f8cce8a feat: Add JSON Script Example and Lua Test Framework
- Created a new package for JSON Script Example with comprehensive examples demonstrating the full JSON script specification.
- Added permissions for viewing, executing, and modifying examples in the JSON Script Example package.
- Implemented functions for various expressions, statements, operators, and control flow in the JSON Script Example.
- Developed a Storybook configuration for showcasing JSON Script Examples with interactive components.
- Established a styles token file for consistent styling across the JSON Script Example package.
- Introduced a new Lua Test Framework package with components for running and displaying test results.
- Defined permissions for executing and viewing Lua test results, along with configuration and debugging capabilities.
- Implemented a comprehensive set of functions for the Lua testing framework, including assertions and mocks.
- Created Storybook stories for the Lua Test Framework to demonstrate the test runner and results display.
- Added a styles token file for the Lua Test Framework to ensure a cohesive design.
2026-01-02 16:42:39 +00:00

229 lines
5.7 KiB
JSON

{
"$schema": "https://metabuilder.dev/schemas/json-script.schema.json",
"schemaVersion": "2.2.0",
"package": "lua_test",
"description": "Lua unit testing framework functions including assertions, mocks, and test runner",
"functions": [
{
"id": "framework_load_cases",
"name": "loadCases",
"exported": true,
"description": "Load test cases from JSON content",
"category": "core",
"luaScript": "framework.lua"
},
{
"id": "framework_create_suite",
"name": "createSuite",
"exported": true,
"description": "Create a new test suite",
"category": "core",
"luaScript": "framework.lua"
},
{
"id": "describe_it",
"name": "describe",
"exported": true,
"description": "BDD-style describe block for grouping tests",
"category": "core",
"luaScript": "describe.lua"
},
{
"id": "describe_it_case",
"name": "it",
"exported": true,
"description": "BDD-style it block for individual test cases",
"category": "core",
"luaScript": "describe.lua"
},
{
"id": "assertions_expect",
"name": "expect",
"exported": true,
"description": "Chainable assertion builder",
"category": "assertions",
"luaScript": "assertions.lua"
},
{
"id": "assertions_true",
"name": "assertTrue",
"exported": true,
"description": "Assert value is truthy",
"category": "assertions",
"luaScript": "assertions.lua"
},
{
"id": "assertions_false",
"name": "assertFalse",
"exported": true,
"description": "Assert value is falsy",
"category": "assertions",
"luaScript": "assertions.lua"
},
{
"id": "assertions_equal",
"name": "assertEqual",
"exported": true,
"description": "Assert two values are equal",
"category": "assertions",
"luaScript": "assertions.lua"
},
{
"id": "assertions_not_equal",
"name": "assertNotEqual",
"exported": true,
"description": "Assert two values are not equal",
"category": "assertions",
"luaScript": "assertions.lua"
},
{
"id": "assertions_nil",
"name": "assertNil",
"exported": true,
"description": "Assert value is nil",
"category": "assertions",
"luaScript": "assertions.lua"
},
{
"id": "assertions_not_nil",
"name": "assertNotNil",
"exported": true,
"description": "Assert value is not nil",
"category": "assertions",
"luaScript": "assertions.lua"
},
{
"id": "mocks_fn",
"name": "fn",
"exported": true,
"description": "Create a mock function",
"category": "mocks",
"luaScript": "mocks.lua"
},
{
"id": "mocks_spy_on",
"name": "spyOn",
"exported": true,
"description": "Spy on an object method",
"category": "mocks",
"luaScript": "mocks.lua"
},
{
"id": "mocks_mock_object",
"name": "mockObject",
"exported": true,
"description": "Create a mock object",
"category": "mocks",
"luaScript": "mocks.lua"
},
{
"id": "mocks_fake_timers",
"name": "useFakeTimers",
"exported": true,
"description": "Mock timer functions for testing async code",
"category": "mocks",
"luaScript": "mocks.lua"
},
{
"id": "runner_run_test",
"name": "runTest",
"exported": true,
"description": "Run a single test",
"category": "runner",
"luaScript": "runner.lua"
},
{
"id": "runner_run_suite",
"name": "runSuite",
"exported": true,
"description": "Run all tests in a suite",
"category": "runner",
"luaScript": "runner.lua"
},
{
"id": "runner_run_all",
"name": "runAll",
"exported": true,
"description": "Run all registered test suites",
"category": "runner",
"luaScript": "runner.lua"
},
{
"id": "runner_format_report",
"name": "formatReport",
"exported": true,
"description": "Format test results as human-readable report",
"category": "runner",
"luaScript": "runner.lua"
},
{
"id": "runner_format_json",
"name": "formatJSON",
"exported": true,
"description": "Format test results as JSON",
"category": "runner",
"luaScript": "runner.lua"
},
{
"id": "hooks_before_all",
"name": "beforeAll",
"exported": true,
"description": "Run setup before all tests in suite",
"category": "hooks",
"luaScript": "hooks.lua"
},
{
"id": "hooks_after_all",
"name": "afterAll",
"exported": true,
"description": "Run teardown after all tests in suite",
"category": "hooks",
"luaScript": "hooks.lua"
},
{
"id": "hooks_before_each",
"name": "beforeEach",
"exported": true,
"description": "Run setup before each test",
"category": "hooks",
"luaScript": "hooks.lua"
},
{
"id": "hooks_after_each",
"name": "afterEach",
"exported": true,
"description": "Run teardown after each test",
"category": "hooks",
"luaScript": "hooks.lua"
}
],
"exports": {
"functions": [
"loadCases",
"createSuite",
"describe",
"it",
"expect",
"assertTrue",
"assertFalse",
"assertEqual",
"assertNotEqual",
"assertNil",
"assertNotNil",
"fn",
"spyOn",
"mockObject",
"useFakeTimers",
"runTest",
"runSuite",
"runAll",
"formatReport",
"formatJSON",
"beforeAll",
"afterAll",
"beforeEach",
"afterEach"
]
}
}