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

Tests for backend #2455

Closed
wants to merge 3 commits into from
Closed

Tests for backend #2455

wants to merge 3 commits into from

Conversation

mingxin0607
Copy link
Contributor

#1220
Add test cases for packages/server/src/utils/hub.ts

Run with:

node packages/server/test/utils/hub.test.js

Output:

Test passed: System message prompt
Test passed: Human message prompt
Test passed: AI message prompt
Test passed: Template prompt
Test passed: Empty messages array

@HenryHengZJ
Copy link
Contributor

@mingxin0607 thank you for starting the unit test effort, we need this! Is there any other tests cases you were thinking to add? We separated out most functions to packages/server/src/utils, they should be good for unit tests

@mingxin0607 mingxin0607 deleted the test branch May 24, 2024 21:44
@mingxin0607 mingxin0607 restored the test branch May 24, 2024 21:45
@mingxin0607
Copy link
Contributor Author

@mingxin0607 thank you for starting the unit test effort, we need this! Is there any other tests cases you were thinking to add? We separated out most functions to packages/server/src/utils, they should be good for unit tests

Thank you for your information! I just added a test case for logger.ts under packages/server/src/utils, and made a new pull request.
#2484

@mingxin0607 mingxin0607 deleted the test branch May 24, 2024 22:02
@mingxin0607 mingxin0607 restored the test branch May 28, 2024 23:27
@mingxin0607 mingxin0607 reopened this May 28, 2024
@mingxin0607
Copy link
Contributor Author

Hello, I accidentally closed this PR before, now I reopen it, hope to hear back from you =)

@mingxin0607
Copy link
Contributor Author

Hello, I notice that this test case has already been merged, so I'm closing this pr.

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.

None yet

3 participants