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

fix: fixing failing goals, cache and token tests #522

Merged
merged 5 commits into from
Nov 25, 2024

Conversation

ai16z-demirix
Copy link
Contributor

Relates to:

#519

Risks

low - fixing tests

Background

What does this PR do?

Fixing goals, cache and token tests

What kind of change is this?

Bug-fixes

Fixing tests to prevent flaky tests.

Documentation changes needed?

None

Testing

Where should a reviewer start?

navigate to packages/core

Detailed testing steps

run pnpm install, pnpm test

Copy link
Contributor

@pgoos pgoos left a comment

Choose a reason for hiding this comment

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

Hey @ai16z-demirix . Nice work! Have you actually run the tests before creating the PR? When I run them in codespaces with npm run test I am getting a bunch of failures. Some of them are related to No test files found, exiting with code 1 (we should fix that for CI purposes) but there's also token.test.ts test file that fails with:

 FAIL  src/tests/token.test.ts [ src/tests/token.test.ts ]
Error: Failed to resolve entry for package "@ai16z/plugin-solana". The package may have incorrect main/module/exports specified in its package.json.

The thing is that I see @ai16z/plugin-solana installed as a dependency. I think the problem related to imported modules is bigger. For example, if you open agent/src/index.ts, you can see that most of the imports are not referenced correctly.

@ai16z-demirix
Copy link
Contributor Author

Hello @pgoos thanks for reaching out! Yes, I have run tests locally multiple times before creating the PR.
You should maybe try runing pnpm test, instead of npm test.
Honestly, I am confused with this error: No test files found, exiting with code 1
Are you sure that you are executing tests in packages/core directory?
This is my output:
Screenshot from 2024-11-23 18-10-09

The other error with @ai16z/plugin-solana persisted also on my local until I ran pnpm build. We can figure this out, there is problem with imports definitely.

@ai16z-demirix ai16z-demirix requested a review from pgoos November 23, 2024 17:13
@yakul0

This comment was marked as abuse.

@@ -61,6 +60,7 @@
"@ai16z/adapter-sqlite": "workspace:*",
"@ai16z/adapter-sqljs": "workspace:*",
"@ai16z/adapter-supabase": "workspace:*",
"@ai16z/plugin-solana": "workspace:*",
Copy link
Member

Choose a reason for hiding this comment

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

We can't have this reference here, this test sould be moved to the solana plugin

Copy link
Member

@lalalune lalalune left a comment

Choose a reason for hiding this comment

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

Please fix package.json, move token test to solana plugin

@ai16z-demirix
Copy link
Contributor Author

@lalalune Fixed! Thank you for this input.
Fixed package.json file and moved token.test to solana plugin. Added vitest to that package. Tests are running properly now.

@lalalune lalalune merged commit c6a3bf9 into elizaOS:main Nov 25, 2024
1 of 2 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.

4 participants