Repository navigation
test: raise line coverage to 95.6% - #688
Merged
Merged
Conversation
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.
Raises combined line coverage from 91.4% to 95.6% (frontend 93.7%, backend 96.2%). The bugs these tests turned up were fixed in #687.
Backend
createAppHarness()loads all ofapp.jsin avmcontext, with the modules a test names swapped for stand-ins and nothing started, so a test can put it through failures a real server is hard to set up: a database write that throws, a provider that is down, a client that leaves mid-download.createRouteHarness()builds on it to call a route's handler directly. CONTRIBUTING says when to use these and when to usestartApp(), which still covers authentication and permissions.app.jsinstead of a slice of it, so they count toward its coverage.$count, which the duplicate summary uses.Frontend: themes, sign-in and registration errors, the OIDC redirect, player queues and chapters, bulk download actions, archive imports, search results, format selection, several dialogs, and the password hidden in the simulated command.
Removed: six functions in
authentication/auth.jsand one inconfig.jsthat nothing calls, among them a JWT check that read the token from the query string and aremovePlaylistthat deleted from aplaylisttable that does not exist.Updates the README badge from 91.4% to 95.6%, measured with the local LDAP harness enabled.
Validation on Node 26.13.0: