test: add comprehensive tests for Tumblr readers#17
Merged
gvonness-apolitical merged 1 commit intomainfrom Feb 3, 2026
Merged
Conversation
TumblrReader tests (21): - load() error handling - loadFromUrl() with options and callbacks - Navigation (next, prev, goTo) - History management - Cache integration - getNavigation, hasNavigation - getCurrentPost, getBlogName - destroy cleanup TumblrPlaylistReader tests (21): - load() error handling - loadFromPlaylist() with URL extraction - Navigation (next, prev, goTo) - ToC generation and navigation - hasNavigation states - prefetchAll with progress - clearCache and ToC updates - exportAsEpub - destroy cleanup Increases test count from 149 to 191 (+42 tests)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds comprehensive unit tests for TumblrReader and TumblrPlaylistReader, increasing test coverage for the reader implementations.
Tests Added
TumblrReader (21 tests)
load()- throws error when called directlyloadFromUrl()- initialization, custom proxy, callbacks, error handlingnext(),prev(),goTo()with history trackinggetNavigation()- returns navigation object with methodshasNavigation()- correct navigation availability statesgetCurrentPost(),getBlogName()- post data accesssetOnPageChange()- callback updatesdestroy()- cleanup resourcesTumblrPlaylistReader (21 tests)
load()- throws error when called directlyloadFromPlaylist()- playlist parsing, URL extraction, ToC generationnext(),prev(),goTo()with boundary handlinggetToc(),goToTocItem()- ToC navigationhasNavigation()- correct states at first/middle/last postsprefetchAll()- progress callbacks, prevents duplicate runsclearCache()- cache clearing and ToC updatesexportAsEpub()- EPUB generationgetDefaultEpubTitle(),getBlogName()- metadata accessdestroy()- cleanup resourcesImpact
Test plan