Skip to content

Conversation

@stevebio
Copy link
Collaborator

…await.

Copilot AI review requested due to automatic review settings October 22, 2025 18:35
@github-actions
Copy link

github-actions bot commented Oct 22, 2025

Copyright Validation Results
Total: 3 | Passed: 2 | Failed: 0 | Skipped: 1 | at: 2025-10-24 05:30:16 UTC | commit: 4df363f

⏭️ Skipped (Excluded) Files

  • .mocharc.json

✅ Valid Files

  • test-basic/documents-data-movement-removeAllUris.js
  • test-complete/nodejs-dmsdk-removeAllUris.js

✅ All files have valid copyright headers!

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 done callbacks to async/await with 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.

Copy link
Contributor

@rjrudin rjrudin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@stevebio stevebio force-pushed the MLE-24825-convert-dm-removeAllUris branch 3 times, most recently from c29b079 to 317b57c Compare October 24, 2025 04:26
…await.

Add exit as default for mocha to avoid hangs.
@stevebio stevebio force-pushed the MLE-24825-convert-dm-removeAllUris branch from 317b57c to 4df363f Compare October 24, 2025 05:29
@stevebio stevebio closed this Oct 27, 2025
@stevebio stevebio deleted the MLE-24825-convert-dm-removeAllUris branch October 27, 2025 17:04
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