mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 06:14:59 +00:00
- Added `package_system.tla` to model the schema-driven package system, including multi-source loading, validation, dependency resolution, and permission filtering. - Created `package_system.cfg` for TLC model checker configuration, defining constants and invariants for bounded model checking. - Updated `metabuilder.tla` to reflect the core specification of MetaBuilder, emphasizing the package lifecycle and related specifications.
140 lines
4.0 KiB
JSON
140 lines
4.0 KiB
JSON
{
|
|
"$schema": "https://metabuilder.dev/schemas/tests.schema.json",
|
|
"schemaVersion": "2.0.0",
|
|
"package": "database_manager",
|
|
"description": "Package metadata validation tests",
|
|
|
|
"testSuites": [
|
|
{
|
|
"id": "package-metadata",
|
|
"name": "Package Metadata Tests",
|
|
"description": "Validate package.json metadata structure and values",
|
|
"tags": ["metadata", "validation"],
|
|
|
|
"tests": [
|
|
{
|
|
"id": "test-package-id",
|
|
"name": "should have correct packageId",
|
|
"act": {
|
|
"type": "function_call",
|
|
"target": "getPackageMetadata",
|
|
"input": "database_manager"
|
|
},
|
|
"assert": {
|
|
"expectations": [
|
|
{
|
|
"type": "equals",
|
|
"actual": "result.packageId",
|
|
"expected": "database_manager",
|
|
"description": "Package ID should match"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "test-min-level",
|
|
"name": "should require SuperGod level",
|
|
"act": {
|
|
"type": "function_call",
|
|
"target": "getPackageMetadata",
|
|
"input": "database_manager"
|
|
},
|
|
"assert": {
|
|
"expectations": [
|
|
{
|
|
"type": "equals",
|
|
"actual": "result.minLevel",
|
|
"expected": 5,
|
|
"description": "minLevel should be 5 (SuperGod)"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "test-icon-exists",
|
|
"name": "should have an icon file",
|
|
"act": {
|
|
"type": "function_call",
|
|
"target": "checkFileExists",
|
|
"input": "database_manager/static_content/icon.svg"
|
|
},
|
|
"assert": {
|
|
"expectations": [
|
|
{
|
|
"type": "truthy",
|
|
"actual": "result",
|
|
"description": "Icon file should exist"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "test-category",
|
|
"name": "should be in tools category",
|
|
"act": {
|
|
"type": "function_call",
|
|
"target": "getPackageMetadata",
|
|
"input": "database_manager"
|
|
},
|
|
"assert": {
|
|
"expectations": [
|
|
{
|
|
"type": "equals",
|
|
"actual": "result.category",
|
|
"expected": "tools",
|
|
"description": "Category should be tools"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "test-schema-valid",
|
|
"name": "package.json should be valid against schema",
|
|
"act": {
|
|
"type": "function_call",
|
|
"target": "validateAgainstSchema",
|
|
"input": {
|
|
"file": "database_manager/package.json",
|
|
"schema": "https://metabuilder.dev/schemas/package-metadata.schema.json"
|
|
}
|
|
},
|
|
"assert": {
|
|
"expectations": [
|
|
{
|
|
"type": "truthy",
|
|
"actual": "result.valid",
|
|
"description": "package.json should be valid"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "test-exports-components",
|
|
"name": "should export required components",
|
|
"act": {
|
|
"type": "function_call",
|
|
"target": "getPackageMetadata",
|
|
"input": "database_manager"
|
|
},
|
|
"assert": {
|
|
"expectations": [
|
|
{
|
|
"type": "contains",
|
|
"actual": "result.exports.components",
|
|
"expected": "DatabaseManager",
|
|
"description": "Should export DatabaseManager component"
|
|
},
|
|
{
|
|
"type": "contains",
|
|
"actual": "result.exports.components",
|
|
"expected": "DatabaseStats",
|
|
"description": "Should export DatabaseStats component"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|