Moving to all stateless

This commit is contained in:
Luke Hagar
2022-07-28 06:50:55 -05:00
parent 566c9b64ff
commit 3a45b3dc51
3 changed files with 217 additions and 156 deletions

View File

@@ -34,7 +34,11 @@ describe("Unit Tests", function () {
assert.notEqual(PlexSession.plexServers, null);
assert.notEqual(PlexSession.plexServers, undefined);
assert.notEqual(PlexSession.plexDevices, emptyArray);
assert.notEqual(PlexSession.plexDevices, null);
assert.notEqual(PlexSession.plexDevices, undefined);
assert.notEqual(response, emptyArray);
assert.notEqual(response, null);
assert.notEqual(response, undefined);
// console.log("Plex Servers");
// console.log(PlexSession.plexServers);
});
@@ -44,60 +48,43 @@ describe("Unit Tests", function () {
assert.notEqual(PlexSession.plexLibraries, null);
assert.notEqual(PlexSession.plexLibraries, undefined);
assert.notEqual(PlexSession.plexLibraries, emptyArray);
assert.notEqual(PlexSession.plexMusicLibraries, null);
assert.notEqual(PlexSession.plexMusicLibraries, undefined);
assert.notEqual(PlexSession.plexMusicLibraries, emptyArray);
assert.notEqual(response, emptyArray);
assert.notEqual(response, null);
assert.notEqual(response, undefined);
// console.log("Plex Libraries");
// console.log(PlexSession.plexLibraries);
});
it("Get Plex Movies Libraries", async function () {
this.timeout(10000);
let response = await PlexSession.GetPlexMovieLibraries();
assert.notEqual(PlexSession.plexMovieLibraries, null);
assert.notEqual(PlexSession.plexMovieLibraries, undefined);
assert.notEqual(PlexSession.plexMovieLibraries, emptyArray);
assert.notEqual(response, emptyArray);
assert.notEqual(response, null);
assert.notEqual(response, undefined);
// console.log("Plex Libraries");
// console.log(PlexSession.plexLibraries);
});
it("Get Plex Music Libraries", async function () {
this.timeout(10000);
let response = await PlexSession.GetPlexMusicLibraries();
assert.notEqual(PlexSession.plexMusicLibraries, null);
assert.notEqual(PlexSession.plexMusicLibraries, undefined);
assert.notEqual(PlexSession.plexMusicLibraries, emptyArray);
assert.notEqual(response, emptyArray);
assert.notEqual(response, null);
assert.notEqual(response, undefined);
// console.log("Plex Libraries");
// console.log(PlexSession.plexLibraries);
});
it("Get Plex TV Libraries", async function () {
this.timeout(10000);
let response = await PlexSession.GetPlexTVShowLibraries();
assert.notEqual(PlexSession.plexTVShowLibraries, null);
assert.notEqual(PlexSession.plexTVShowLibraries, undefined);
assert.notEqual(PlexSession.plexTVShowLibraries, emptyArray);
// console.log("Plex Libraries");
// console.log(PlexSession.plexLibraries);
});
// it("Get Plex Movie Library Contents", async function () {
// this.timeout(10000);
// let response = await PlexSession.GetPlexMovieLibraryContent();
// assert.notEqual(PlexSession.plexMovieLibraryContent, null);
// assert.notEqual(PlexSession.plexMovieLibraryContent, undefined);
// assert.notEqual(PlexSession.plexMovieLibraryContent, emptyArray);
// // console.log("Plex Movie Library Content");
// // console.log(PlexSession.plexMovieLibraryContent);
// });
// it("Get Plex Music Library Contents", async function () {
// this.timeout(10000);
// let response = await PlexSession.GetPlexMusicLibraryContent();
// assert.notEqual(PlexSession.plexArtistLibraries, null);
// assert.notEqual(PlexSession.plexArtistLibraries, undefined);
// assert.notEqual(PlexSession.plexArtistLibraries, emptyArray);
// assert.notEqual(PlexSession.plexAlbumLibraries, null);
// assert.notEqual(PlexSession.plexAlbumLibraries, undefined);
// assert.notEqual(PlexSession.plexAlbumLibraries, emptyArray);
// assert.notEqual(PlexSession.plexSongLibraries, null);
// assert.notEqual(PlexSession.plexSongLibraries, undefined);
// assert.notEqual(PlexSession.plexSongLibraries, emptyArray);
// // console.log("Plex Library Content");
// // console.log(PlexSession.plexAlbumLibraries);
// });
// it("Get Plex TV Library Contents", async function () {
// this.timeout(30000);
// let response = await PlexSession.GetPlexTVShowLibraryContent();
// assert.notEqual(PlexSession.plexTVShowLibraryContent, null);
// assert.notEqual(PlexSession.plexTVShowLibraryContent, undefined);
// assert.notEqual(PlexSession.plexTVShowLibraryContent, emptyArray);
// assert.notEqual(PlexSession.plexSeasonLibraries, null);
// assert.notEqual(PlexSession.plexSeasonLibraries, undefined);
// assert.notEqual(PlexSession.plexSeasonLibraries, emptyArray);
// assert.notEqual(PlexSession.episodeLibraryContent, null);
// assert.notEqual(PlexSession.episodeLibraryContent, undefined);
// assert.notEqual(PlexSession.episodeLibraryContent, emptyArray);
// //console.log("Plex TV Library Content");
// //console.log(PlexSession.plexSeasonLibraries);
// });
it("Get Plex TV Show Seasons - Stateless", async function () {
this.timeout(4000);
let response = await PlexSession.GetPlexTVShowSeasons();
//console.log(response);
});
});