Skip to content
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: adding tests. changed files actions.test.ts, messages.test.ts, models.test.ts #998

Merged
merged 4 commits into from
Dec 14, 2024

Conversation

ai16z-demirix
Copy link
Contributor

Relates to:

No particular issue, adding more coverage and more tests for actions.test.ts, messages.test.ts, models.test.ts to cover more functionalities.

Risks

Low, adding tests.

Background

What does this PR do?

This PR adds more tests to already existing test suites.

What kind of change is this?

Documentation changes needed?

Testing

Where should a reviewer start?

packages/core/src/tests/

Detailed testing steps

navigate to packages/core and run pnpm install and pnpm test

Copy link
Collaborator

@monilpat monilpat left a comment

Choose a reason for hiding this comment

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

Thanks for doing this looks good outside of comments :)

Comment on lines +41 to +43
handler: async () => { throw new Error("Not implemented"); },
validate: async () => { throw new Error("Not implemented"); },
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should probably implement these and test then properly in a follow up PR :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can't wait! :)


test("should have correct model mappings", () => {
const openAIModels = models[ModelProviderName.OPENAI].model;
expect(openAIModels[ModelClass.SMALL]).toBe("gpt-4o-mini");
Copy link
Collaborator

Choose a reason for hiding this comment

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

instead of hardcoding we pay want to use the settings and then default to the hard coded values. As this will change for instance when we add o1 and o1 pro support See https://github.com/ai16z/eliza/pull/999/files#diff-c128c91a940e645cc1d7842bec41d065604fce9e1bbc69dfca3f3d089cac52eb

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point

@monilpat
Copy link
Collaborator

Please update the PR to be against develop and not main

@ai16z-demirix ai16z-demirix changed the base branch from main to develop December 12, 2024 18:54
@ai16z-demirix
Copy link
Contributor Author

Changed base to develop @monilpat

@odilitime odilitime deleted the branch elizaOS:develop December 13, 2024 02:37
@odilitime odilitime closed this Dec 13, 2024
@odilitime odilitime reopened this Dec 13, 2024
@odilitime odilitime deleted the branch elizaOS:develop December 13, 2024 19:07
@odilitime odilitime closed this Dec 13, 2024
@odilitime odilitime reopened this Dec 13, 2024
@odilitime odilitime merged commit ea1ef58 into elizaOS:develop Dec 14, 2024
8 of 12 checks passed
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