diff options
| author | Craig Jennings <c@cjennings.net> | 2025-11-08 10:26:17 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-11-08 10:26:17 -0600 |
| commit | 44d48bad4d317ce8fd9361314d349b1256e6c25b (patch) | |
| tree | 90eeae6fd6512dc5418da1600e198a52cd29ee35 /tests/test-wttrin--display-weather.el | |
| parent | 7673e72ed4dc4af9c3db9a5962c4673bd1ce90e3 (diff) | |
refactor: fetch: extract duplicate URL fetching logic into wttrin--fetch-url
- Created wttrin--fetch-url helper to eliminate code duplication
- Refactored wttrin-fetch-raw-string to use helper (27 lines -> 3 lines)
- Refactored wttrin--mode-line-fetch-weather to use helper (~30 lines -> ~10 lines)
- Added comprehensive ERT test suite with 9 tests covering normal, boundary, and error cases
- All tests passing
This refactoring provides a single point of truth for async URL fetching,
making the code more maintainable and reducing duplication by ~40 lines.
Diffstat (limited to 'tests/test-wttrin--display-weather.el')
0 files changed, 0 insertions, 0 deletions
