-
Notifications
You must be signed in to change notification settings - Fork 2
Refactor: Break down massive test file into focused test files #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
semantic_elements_test.dart was an exact duplicate of use_state_js_test.dart. - Removes 1,914 lines of duplicated test code
…ies: cloneElement and isValidElement
First PR! Thanks. Will have a look soon |
|
More to come 😀 |
|
@MelbourneDeveloper . Had a look yet? |
Overview
Refactored the large
use_state_js_test.dartfile (1914 lines) by breaking each test group into separate, focused test files following the project's "no groups" philosophy. Also removed duplicate test files and consolidated their content.Changes Made
Files Removed
test/use_state_js_test.dart- Massive 1914-line file with all test groupstest/semantic_elements_test.dart- Duplicate file was deleted as it was a duplicate oftest/use_state_js_test.dartNew Test Files Created
Hook Tests (
test/hooks/)use_state_test.dart- useState hook functionality testsuse_state_js_array_test.dart- useStateJSArray hook testsuse_state_lazy_test.dart- useStateLazy hook testsuse_effect_test.dart- useEffect hook testsuse_layout_effect_test.dart- useLayoutEffect hook testsuse_reducer_test.dart- useReducer hook testsuse_reducer_lazy_test.dart- useReducerLazy hook testsuse_context_test.dart- useContext hook testsuse_ref_test.dart- useRef hook testscreate_ref_test.dart- createRef function testsuse_memo_test.dart- useMemo hook testsuse_callback_test.dart- useCallback hook testsComponent Tests (
test/components/)component_utilities_test.dart- forwardRef, memo, Children utilitiesspecial_components_test.dart- Fragment, StrictMode, cloneElement, isValidElementrendering_test.dart- conditional and list renderingcomposition_test.dart- component composition patternsFeature Tests
test/events/event_handling_test.dart- Event handling functionalitytest/elements/html_elements_test.dart- HTML element renderingtest/jsx/jsx_dsl_test.dart- JSX DSL syntax testsBenefits
Test Results
File Organization
This refactoring addresses the explicit TODO comment:
// TODO: Break each group into separate files. No groups!and significantly improves test maintainability.