-
Notifications
You must be signed in to change notification settings - Fork 9k
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(core): Move unit tests closer to testable components (no-changelog) #10287
test(core): Move unit tests closer to testable components (no-changelog) #10287
Conversation
@@ -25,6 +24,36 @@ import { ProjectRepository } from '@/databases/repositories/project.repository'; | |||
|
|||
const ownershipService = mockInstance(OwnershipService); | |||
|
|||
function mockNodeTypesData( |
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.
Moved from test/unit/Helpers.ts
* the macrotask queue and so called at the next iteration of the event loop | ||
* after all promises in the microtask queue have settled first. | ||
*/ | ||
export const flushPromises = async () => await new Promise(setImmediate); |
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.
Moved from test/unit/Helpers.ts
Unit tests have been residing in `test/unit/` directory. We want to them to be closer to the source files. This moves all the unit tests to `__tests__` directories next to the components that are being tested.
c926395
to
b4d89c8
Compare
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.
Thanks 🎉
Test summaryRun details
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Cloud |
✅ All Cypress E2E specs passed |
* master: feat(editor): Auto-add LLM chain for new LLM nodes on empty canvas (#10245) fix(core): Fix user telemetry bugs (#10293) refactor(core): Remove stray log from telemetry event relay (no-changelog) (#10295) refactor(core): Decouple user events from internal hooks (no-changelog) (#10292) feat(core): Support community packages in scaling-mode (#10228) test(core): Move unit tests closer to testable components (no-changelog) (#10287) fix(core): Webhook and form baseUrl missing (#10290) refactor(core): Port cache config (no-changelog) (#10286)
Import paths were different at 1.45 and have seen changes e.g. with #10287
Got released with |
Summary
Unit tests have been residing in
test/unit/
directory. We want to them to be closer to the source files. This moves all the unit tests to__tests__
directories next to the components that are being tested.Review / Merge checklist
release/backport
(if the PR is an urgent fix that needs to be backported)