mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 11:22:15 +00:00
test(core): Move unit tests closer to testable components (no-changelog) (#10287)
This commit is contained in:
6
packages/cli/test/shared/flushPromises.ts
Normal file
6
packages/cli/test/shared/flushPromises.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Ensure all pending promises settle. The promise's `resolve` is placed in
|
||||
* 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);
|
||||
Reference in New Issue
Block a user