finalhandler
finalhandler copied to clipboard
test: modernize test suite and remove obsolete tests
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: ConvertedSlowWriteStreamfrom a function andutil.inheritsto an ES6 class extendingWritable.
Refactoring Utility Functions:
test/support/utils.js: Refactored various utility functions to use ES6 syntax, replacedvarwithconst/let, and consolidated exports into a singlegetTestHelpersfunction. [1] [2] [3] [4] [5]
Updating Test Cases:
test/test.js: Updated test cases to use the newgetTestHelpersfunction, removed redundantwrapperfunction, and replacedvarwithconst/letfor variable declarations. [1] [2] [3] [4] [5]