@ebowwa/glm-daemon-tests
v0.1.0
Published
Test utilities and framework for GLM daemon packages
Downloads
45
Readme
@codespaces/glm-daemon-tests
Test framework and utilities for GLM daemon packages.
Features
- Test Runner: Full-featured test runner with suites, hooks, and assertions
- Mock Implementations: Pre-built mocks for all GLM daemon components
- Assertion Helpers: Rich assertion library with async support
- Test Isolation: Automatic mock cleanup between tests
Usage
import { describe, testRunner } from "@codespaces/glm-daemon-tests";
describe("My Test Suite", (suite) => {
suite.test("should pass", async (context) => {
const value = true;
context.expect(value).truthy();
});
suite.test("async operations", async (context) => {
const result = await Promise.resolve(42);
context.expect(result).equals(42);
});
});
// Run tests
const results = await testRunner.run();
testRunner.printResults();Mock Components
import { createMockGLMDaemonSetup } from "@codespaces/glm-daemon-tests";
const setup = createMockGLMDaemonSetup();
// Use mocked components
await setup.agent.execute("test prompt");
await setup.stateManager.save("key", { data: "value" });
await setup.hookSystem.execute("TestEvent");License
MIT
