Commit Graph
6 Commits
Author SHA1 Message Date
mahseiah_ai 66568b5e0f ci: switch to bun runner, remove setup-bun steps 2026-05-07 07:37:00 -05:00
mahseiah_ai ff0f797d20 ci: replace oven-sh/setup-bun with curl install for Gitea Actions compatibility
The  action is a GitHub Marketplace action
that doesn't exist on self-hosted Gitea instances. Replace it with
the standard curl-based Bun installation method and add ~/.bun/bin
to GITHUB_PATH.
2026-05-07 07:37:00 -05:00
mahseiah_ai 9ebac95c27 test: add comprehensive unit tests for all appenders and logger
Tests added:
- log-service.test.ts: hierarchical logger creation and threshold propagation
- logger.test.ts: threshold inheritance, message propagation, falsy threshold
  bug coverage (LogLevel.ALL = 0), deferred messages, Error handling
- log-message.test.ts: parseLogLevel parsing, flattenMessage object/string modes
- console-log-appender.test.ts: threshold, formatter, all-level routing
- buffer-log-appender.test.ts: buffer append, threshold filtering, clearBuffer
- api-log-appender.test.ts: configuration defaults, threshold, auth token

Also fixes src/index.ts to export BufferLogAppender which was previously
missing from the barrel export.
2026-05-07 07:37:00 -05:00
mahseiah_ai 7bb80989c4 ci: add Gitea Actions workflow for test validation
- Runs on PRs targeting main and pushes to main
- Uses oven-sh/setup-bun@v2 to provision Bun
- Runs bun test v1.3.12 (700fc117) to validate the library
2026-05-07 07:37:00 -05:00
mahseiah_ai a6aff1a5b9 build: add test and test:coverage scripts to package.json
- bun test v1.3.12 (700fc117) runs bun test (discovers tests in test/ directory)
- bun test v1.3.12 (700fc117) runs tests with coverage reporting
2026-05-07 07:37:00 -05:00
mahseiah_ai c957150879 test: stand up test scaffolding with bun test
- Create test/ directory with a minimal LogService test
- Prove out the pattern: bun test natively discovers and runs tests
  in the test/ directory using ESM-style imports from ../src/
2026-05-07 07:37:00 -05:00