finalhandler icon indicating copy to clipboard operation
finalhandler copied to clipboard

test: modernize test suite and remove obsolete tests

Open Phillip9587 opened this issue 9 months ago • 0 comments

This pull request includes several refactorings and updates to the test suite, focusing on modernizing the codebase by adopting ES6+ features and improving the structure of test utilities. The most important changes include refactoring utility functions, and updating test cases to use the new utility structure.

ES6+ Modernization:

  • test/support/sws.js: Converted SlowWriteStream from a function and util.inherits to an ES6 class extending Writable.

Refactoring Utility Functions:

  • test/support/utils.js: Refactored various utility functions to use ES6 syntax, replaced var with const/let, and consolidated exports into a single getTestHelpers function. [1] [2] [3] [4] [5]

Updating Test Cases:

  • test/test.js: Updated test cases to use the new getTestHelpers function, removed redundant wrapper function, and replaced var with const/let for variable declarations. [1] [2] [3] [4] [5]

Phillip9587 avatar Mar 31 '25 19:03 Phillip9587