@@ -11,14 +11,30 @@ describe('PlaylistController', () => {
11
11
playlistController . initRoutes ( )
12
12
} )
13
13
14
- it ( 'retrieve playlist by link' , async ( ) => {
14
+ it ( 'retrieve playlist by featured link' , async ( ) => {
15
15
const response = await playlistController . controller . request (
16
16
'/playlists?link=https://www.jiosaavn.com/featured/its-indie-english/AMoxtXyKHoU_'
17
17
)
18
18
19
19
const { data } = ( await response . json ( ) ) as { data : z . infer < typeof PlaylistModel > }
20
20
expect ( ( ) => PlaylistModel . parse ( data ) ) . not . toThrow ( )
21
21
} )
22
+ it ( 'retrieve playlist by saavn domain link' , async ( ) => {
23
+ const response = await playlistController . controller . request (
24
+ '/playlists?link=https://www.saavn.com/s/playlist/cf3c2fb07449311f87f53670da0e3d20/gautham-menon-telugu-hits/4sylrSC21MjvZ3uUE6bUVw__'
25
+ )
26
+
27
+ const { data } = ( await response . json ( ) ) as { data : z . infer < typeof PlaylistModel > }
28
+ expect ( ( ) => PlaylistModel . parse ( data ) ) . not . toThrow ( )
29
+ } )
30
+ it ( 'retrieve playlist by jiosaavn domain link' , async ( ) => {
31
+ const response = await playlistController . controller . request (
32
+ '/playlists?link=https://www.jiosaavn.com/s/playlist/cf3c2fb07449311f87f53670da0e3d20/best-of-2022/BD9hSFlc9ubvZ3uUE6bUVw__'
33
+ )
34
+
35
+ const { data } = ( await response . json ( ) ) as { data : z . infer < typeof PlaylistModel > }
36
+ expect ( ( ) => PlaylistModel . parse ( data ) ) . not . toThrow ( )
37
+ } )
22
38
23
39
it ( 'retrieve playlist by ID' , async ( ) => {
24
40
const response = await playlistController . controller . request ( '/playlists?id=82914609' )
0 commit comments