-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added initial tests for agents in the-org #4067
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall the test structure makes sense to me would be curious to see the output of the tests to see what is passing and what is failing but imagine you are working through the failures now which is why it is in a draft state
"format:check": "prettier --check ./src" | ||
"format:check": "prettier --check ./src", | ||
"test:watch": "vitest", | ||
"test:coverage": "vitest run --coverage", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a test for test:org that runs all the tests in the org repo as well?
Yeah the current structure includes use of mock implementations in few places which needs to be replaced with the actual class, but had some issues with them, will look into them and update the status. |
Relates to
https://github.com/Sifchain/issues/397Risks
Low - The changes are focused on test infrastructure and don't affect production code. The main risk is that some tests might fail in specific environments due to timing or process management issues.
Background
What does this PR do?
This PR implements an initial test suite for the ElizaOS agent system, establishing the foundation for future robust testing. The current implementation includes:
Note: This is a draft PR with initial test implementations. The tests will be enhanced with more comprehensive scenarios, better error handling, and real-world use cases in future updates.
What kind of change is this?
Improvements (misc. changes to existing features) - This PR adds initial test coverage for existing functionality without changing the core behavior.
Documentation changes needed?
My changes do not require a change to the project documentation.
Testing
Where should a reviewer start?
Reviewers should start by examining the test files in the
eliza/packages/the-org/tests/
directory:setup.ts
- Basic test infrastructure and mock servicessocial-media-manager.test.ts
- Initial social media manager agent testsDetailed testing steps
Test Setup Infrastructure:
bun test tests/setup.ts
Social Media Manager Tests:
bun test tests/social-media-manager.test.ts
Other Agent Tests:
Database changes
None - These tests use mock services and don't affect the database.
Deployment instructions
No special deployment instructions needed. The tests can be run locally using:
Future Improvements
The current test suite is a foundation that will be enhanced in future updates with:
The current implementation provides a basic structure that can be built upon, focusing on establishing patterns and practices for future test development.