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

server-util-logger test #2484

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mingxin0607
Copy link
Contributor

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

Run with:

npx ts-node packages/server/test/utils/logger.test.ts

Output:

Running Test: Should call next() for a valid API call
next() called

@mingxin0607 mingxin0607 mentioned this pull request May 24, 2024
@HenryHengZJ
Copy link
Contributor

HenryHengZJ commented May 28, 2024

thank you @mingxin0607 !

can we avoid having console log? and from the test file we mock the req and response, but I think we should use jest expect to correctly test it. Something like: https://stackoverflow.com/a/60723123

Reference PR - https://github.com/FlowiseAI/Flowise/pull/2485/files

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.

2 participants