MLE-24825 Convert basic and complete dm removeAllUris tests to async/…#1016
MLE-24825 Convert basic and complete dm removeAllUris tests to async/…#1016stevebio wants to merge 1 commit intomarklogic:developfrom
Conversation
|
Copyright Validation Results ⏭️ Skipped (Excluded) Files
✅ Valid Files
✅ All files have valid copyright headers! |
There was a problem hiding this comment.
Pull Request Overview
This PR converts test files from callback-based asynchronous patterns to async/await patterns, modernizing the codebase and improving test readability and maintainability.
Key Changes:
- Test functions converted from using
donecallbacks toasync/awaitwith Promise wrappers - Helper functions updated to use async/await patterns
- Error handling improved with try-catch blocks and Promise reject calls
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test-complete/nodejs-dmsdk-removeAllUris.js | Converted all test cases and setup hooks from callback-based to async/await pattern |
| test-basic/documents-data-movement-removeAllUris.js | Converted all test cases, setup hooks, and the verifyDocs helper function to async/await pattern |
Comments suppressed due to low confidence (1)
test-complete/nodejs-dmsdk-removeAllUris.js:1
- The Promise lacks error handling. Add a reject parameter to handle cases where errors occur outside the 'error' event listener.
/*
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
rjrudin
left a comment
There was a problem hiding this comment.
Try the Copilot suggestions for removing the try/catch blocks. I want to use this PR to establish the best possible practice for these tests so we have a good reference for how to refactor others / create new ones in the future.
c29b079 to
317b57c
Compare
…await. Add exit as default for mocha to avoid hangs.
317b57c to
4df363f
Compare
…await.