-
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
test: Add CLI tests for setup commands, agent commands, and customizations #4060
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 (
|
Thanks for adding this can you add either a screenshot or screen grab of a run of each of these tests? so output of |
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.
Amazing job on these tests thank you for getting to these so quickly and overall doing a great job of implementation. Added some comments that apply across all files to the first test file. Please let me know if you have any questions!
"clean": "rm -rf dist .turbo node_modules .turbo-tsconfig.json tsconfig.tsbuildinfo", | ||
"test:setup-commands": "vitest test/setup-commands.test.js", | ||
"test:agent-commands": "vitest test/agent-commands.test.js", | ||
"test:agent-customisations": "vitest test/agent-customisation.test.js" |
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.
customizations for both the command and file name
try { | ||
await execAsync('elizaos stop', { reject: false }); | ||
} catch (e) { | ||
// Server might not be running |
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 elizaLogger.error the exception in this case?
bio: ["A test agent for integration testing."], | ||
plugins: [] | ||
}); | ||
const projectRoot = path.resolve(__dirname, '../../..'); |
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.
any way to get the root without a relative path here as the file structure could change - no worries if not
Closing as another PR is taking care of this |
Relates to
Ticket URL: Sifchain#394
Risks
Low – Changes are limited to CLI tests and should not affect other parts of the project.
Background
What does this PR do?
Adds CLI tests to the CLI package to improve test coverage and ensure CLI commands function correctly.
What kind of change is this?
Documentation changes needed?
Testing
Where should a reviewer start?
Start by reviewing the new CLI test cases in the
cli
package.Detailed testing steps
cd packages/cli
bun run test:setup-commands
→ Runsvitest test/setup-commands.test.js
bun run test:agent-commands
→ Runsvitest test/agent-commands.test.js
bun run test:agent-customisations
→ Runsvitest test/agent-customisation.test.js