diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-10-01 09:41:57 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-10-01 09:42:11 -0300 |
commit | dfcf911501211bbfc64b8ce6a964b70c6406447f (patch) | |
tree | f0e4c08f90a46af2cbda0f9f37701b4c4859446b /test | |
parent | b09540f108de841a067f8f6a8e62c82335221ee9 (diff) |
test: test missing tracks property in album.trackSections
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/data/things/album.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/unit/data/things/album.js b/test/unit/data/things/album.js index 0695fdb6..c5f7fa98 100644 --- a/test/unit/data/things/album.js +++ b/test/unit/data/things/album.js @@ -198,7 +198,7 @@ t.test(`Album.coverArtFileExtension`, t => { }); t.test(`Album.tracks`, t => { - t.plan(4); + t.plan(5); const album = new Album(); const track1 = stubTrack('track1'); @@ -237,6 +237,18 @@ t.test(`Album.tracks`, t => { t.same(album.tracks, [track1, track2, track3], `Album.tracks #4: filters out references without matches`); + + album.trackSections = [ + {tracks: ['track:track1']}, + {}, + {tracks: ['track:track2']}, + {}, + {}, + {tracks: ['track:track3']}, + ]; + + t.same(album.tracks, [track1, track2, track3], + `Album.tracks #5: skips missing tracks property`); }); t.test(`Album.trackSections`, t => { |