Skip to content

Conversation

@panz3r
Copy link
Member

@panz3r panz3r commented Jan 11, 2026

This PR completes the migration of the project's test runner from Mocha/Chai to Node.js's built-in node:test module, using node:assert/strict for assertions and tsx for TypeScript support.
It updates all documentation, configuration, and test patterns to reflect the new setup, removes Mocha-related dependencies and configuration files, and ensures that all test files and helper scripts are compatible with the new test runner.
The migration improves maintainability and leverages modern Node.js features for testing.

Test runner migration and configuration updates:

  • All test files now use node:test and node:assert/strict for writing and running tests, with TypeScript support provided by tsx. Mocha/Chai imports and patterns have been replaced throughout the codebase.
  • The .mocharc.json configuration file and all Mocha/Chai-related dependencies have been removed from the project.
  • The test scripts in package.json, documentation, and helper files have been updated to use the new test runner and assertion patterns.

Documentation and agent updates:

  • All references to Mocha/Chai in documentation (AGENTS.md, .github/copilot-instructions.md, migration docs) have been updated to reference the Node.js test runner and new assertion patterns, including detailed migration steps and code examples.
  • The .github/agents/test-developer.agent.md file now describes the new test framework and assertion patterns, with updated code samples and instructions.

Development tooling updates:

  • The VSCode launch configuration (.vscode/launch.json) has been updated to use tsx instead of ts-node for TypeScript execution in development and debugging.

Migration documentation:

  • The migration plan in docs/002-MIGRATION-TEST-RUNNER.md has been marked as completed, with all steps checked off and new patterns/examples added for reference.

@panz3r panz3r added the enhancement New feature or request label Jan 11, 2026
@panz3r panz3r requested a review from Copilot January 11, 2026 00:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the test infrastructure from Mocha/Chai to Node.js's built-in node:test module with node:assert/strict assertions and tsx for TypeScript support. The migration updates all test files, configuration files, and documentation to use modern Node.js testing features while maintaining zero external testing dependencies.

Changes:

  • Replaced Mocha/Chai imports with node:test and node:assert/strict across all test files
  • Removed .mocharc.json and Mocha/Chai dependencies from package.json
  • Updated VSCode debug configurations and documentation to reference the new test runner

Reviewed changes

Copilot reviewed 21 out of 25 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/utils/file-utils.test.ts Migrated assertions from Chai to node:assert/strict
test/utils/color.utils.test.ts Updated to use Node.js test runner and assertions
test/utils/app.utils.test.ts Converted Chai expectations to strict assertions
test/commands/splash.test.ts Added concurrency control and updated test patterns
test/commands/icons.test.ts Migrated to node:test with timeout configuration
test/commands/dotenv.test.ts Updated assertions and added new test cases
test/commands/base.test.ts New test file for BaseCommand functionality
test/cli/runner.test.ts New test file for CLI runner functionality
test/cli/parser.test.ts New test file for argument parser
test/cli/output.test.ts New test file for output utilities
test/cli/help.test.ts New test file for help text generation
test/cli/errors.test.ts New test file for error handling
package.json Updated test script and dependencies
docs/005-CODE-REVIEW-IMPROVEMENTS.md New comprehensive code review document
docs/004-E2E-TEST-IMPLEMENTATION.md Updated examples to use new test framework
docs/002-MIGRATION-TEST-RUNNER.md Marked migration as completed with all steps checked
AGENTS.md Updated testing instructions for new framework
.vscode/launch.json Replaced ts-node with tsx in debug configs
.mocharc.json Removed Mocha configuration file
.github/copilot-instructions.md Updated test runner references
.github/agents/test-developer.agent.md Updated test patterns and examples
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

…file

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@panz3r panz3r merged commit 6d0affc into main Jan 11, 2026
10 checks passed
@panz3r panz3r deleted the migrate-test-runner branch January 11, 2026 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants