cordova-plugin-vibration icon indicating copy to clipboard operation
cordova-plugin-vibration copied to clipboard

refactor: vibration tests to reduce redundancy and improve readability

Open Viole07 opened this issue 4 months ago • 0 comments

Platforms affected

JavaScript (test.js)

Motivation and Context

This refactoring improves the readability and maintainability of the vibration test code by consolidating repetitive functions and reducing redundancy.

Description

  • Refactored code to streamline vibration test functions and minimize duplication.
  • Reorganized HTML generation and action button creation to improve clarity.
  • Simplified the cancellation logic and optimized timeout handling.

Testing

Manually verified vibration functionality across tests, ensuring both initiation and cancellation work as expected for all supported patterns.

Checklist

  • [x] I've run the tests to ensure all new and existing tests pass.
  • [ ] I added automated test coverage where applicable.
  • [ ] Commit is prefixed with (js) as this change affects all JavaScript platforms supporting vibration.
  • [ ] If this Pull Request resolves an issue, I linked to the issue in the text above.
  • [ ] I've updated the documentation if necessary.

Viole07 avatar Oct 26 '24 05:10 Viole07