-
-
Notifications
You must be signed in to change notification settings - Fork 24.5k
Fix server test coverage script #5843
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,8 +5,12 @@ | |
| "dependsOn": ["^build"], | ||
| "outputs": ["dist/**"] | ||
| }, | ||
| "test": {}, | ||
| "test:coverage": {}, | ||
| "test": { | ||
| "dependsOn": ["^build"] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we really need to depend on build for unit tests? usually unit test shouldn't rely on build as the tests are only at unit level |
||
| }, | ||
| "test:coverage": { | ||
| "dependsOn": ["^build"] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comment about build dependency as test script |
||
| }, | ||
| "dev": { | ||
| "cache": false | ||
| } | ||
|
|
||
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 you confirm if this work when running at project level? test seems to be halting at the end of test run the last time I tried
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.
I’m using
supertestfor integration testing, so the server has to fully initialize before tests run. On Windows starting up Flowise is very slow, which is why I added a 3-minute wait to avoid flaky failures. The tests aren’t truly stuck/halt, they’re waiting for startup to complete.https://github.com/FlowiseAI/Flowise/blob/main/packages/server/test/index.test.ts
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.
maybe we should separate this out and use test:integration (or test:int, test:int:coverage for example) instead?
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.
I agree with splitting the test command.
For now, I’ll close this PR first since I’m still new to writing test scripts, and this test is only verifying a simple “Hello World”.
Also, we may not be using
supertestin the future, so I’d prefer not to introduce new integration-test scripts until we decide on the longer-term testing approach.