Skip to content

Conversation

@bs-shobhitkumar
Copy link
Contributor

@bs-shobhitkumar bs-shobhitkumar commented Nov 25, 2025

This pull request updates the DOM serialization logic to fully support asynchronous operations and adds comprehensive tests to ensure correct handling of async serialization scenarios. The main change ensures that the PercyDOM.serialize function is properly awaited, which allows for more robust and flexible snapshot capturing. The new tests verify correct behavior for async serialization, error handling, option passing, and resource management.

Async DOM Serialization Improvements:

  • Changed the captureSerializedDOM function in index.js to properly await the asynchronous PercyDOM.serialize call, ensuring that DOM snapshots are captured reliably in async contexts.

Expanded Test Coverage for Async Serialization:

  • Added a new test suite in test/index.test.mjs to verify async DOM serialization, including cases for correct awaiting, handling of options, error handling, responsive snapshot capture, cookie management, passing custom options, and handling complex resources.

@bs-shobhitkumar bs-shobhitkumar merged commit b38dde8 into master Nov 26, 2025
10 checks passed
@bs-shobhitkumar bs-shobhitkumar deleted the PER_6171_dom_async branch November 26, 2025 11:09
@bs-shobhitkumar bs-shobhitkumar added the ✨ enhancement New feature or request label Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants