Skip to content

Conversation

@samjhill
Copy link

@samjhill samjhill commented Oct 19, 2025

Hi! Big fan of the project. Found you from the excellent YouTube videos from Emergent Garden and figured why not help a bit. This PR adds testing infrastructure, which should allow you to iterate faster and more confidently. Let me know if you have any questions or feedback.

Example successful test run

  • Add Jest testing framework with ES module support
  • Create unit tests for core functionality:
    • Command parsing and execution system
    • Task validation and processing logic
    • Settings configuration handling
    • Model configuration and API selection
    • Utility functions
  • Add integration tests for basic module loading
  • Set up GitHub Actions CI/CD pipeline for automated testing
  • Add test coverage reporting
  • Include comprehensive test documentation
  • All tests verify existing functionality without modifications

@samjhill
Copy link
Author

@MaxRobinsonTheGreat @uukelele-scratch I am not able to add reviewers in the github UI - let me know if you have any questions or need anything from me. Have a great rest of your weekend!

- Add Jest testing framework with ES module support
- Create unit tests for core functionality:
  - Command parsing and execution system
  - Task validation and processing logic
  - Settings configuration handling
  - Model configuration and API selection
  - Utility functions
- Add integration tests for basic module loading
- Set up GitHub Actions CI/CD pipeline for automated testing
- Add test coverage reporting with Codecov integration
- Include comprehensive test documentation
- Optimize CI performance with npm and Jest caching
- Test on Node.js 20.x and 22.x (compatible versions)
- All tests verify existing functionality without modifications
- 72 tests passing with good coverage of core components
@uukelele-scratch
Copy link
Contributor

I think for testing, we should launch them into a real Minecraft world for testing.

Maybe configure repository secrets like $TESTING_SERVER_HOST and IP, as well as $TEST_API_KEY

@MaxRobinsonTheGreat
Copy link
Collaborator

@icwhite wanna test this out?

Copy link
Contributor

@uukelele-scratch uukelele-scratch left a comment

Choose a reason for hiding this comment

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

The test system is fine, but the tests themselves are a bit basic. It would be way better to get it to join an actual Minecraft instance and check if the bot can join, run actions, etc.

@samjhill
Copy link
Author

@uukelele-scratch Haha yeah, that would be epic 😄
But I think that’s a bit more of a “Phase 2” thing. This PR is just about setting up the testing infrastructure so we can eventually do those kinds of advanced integration tests without wrestling with the basics each time.

I’d suggest we merge this as-is and track the live-server testing in a separate issue/PR.

@samjhill
Copy link
Author

samjhill commented Nov 6, 2025

@icwhite @MaxRobinsonTheGreat let me know if you need anything else from me - would love to get this merged :)

Automated testing on:
- Push to `develop`, `unit-test`, `main` branches
- Pull requests to `develop` or `main` branches
- Node.js versions 18.x and 20.x
Copy link
Contributor

Choose a reason for hiding this comment

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

The workflow tests for versions 20.x and 22.x, not 18.x and 20.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants