jellyfin / jellyfin-roku

The Official Roku Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
412 stars 128 forks source link

Create isChainValid() function to easily test property chains #1715

Closed 1hitsong closed 4 months ago

1hitsong commented 4 months ago

Changes

Creates a new helper function to easily check if deeply buried properties are valid.

Backports changes from #1691 to fix unit tests in bug branch.

Backports isAllValid() from master to use in bug fixes

Examples

isChainValid(m.global, "session.user.settings.lastRunVersion") returns true

isChainValid(m.global, "session.nouser.settings.lastRunVersion") returns false

cewert commented 4 months ago

Can we add some unit tests for the new functions? Just to be sure they won't blow up when we start using them everywhere

1hitsong commented 4 months ago

Can we add some unit tests for the new functions? Just to be sure they won't blow up when we start using them everywhere

Tests for chainIsValid() and isAllValid() added.