vk-music-dl/test/lib.test.js
2020-09-27 11:23:23 +02:00

15 lines
508 B
JavaScript

'use strict';
const assert = require('assert');
const {getSpotifyPlaylist} = require('../lib');
describe('getSpotifyPlaylist', function(){
it('acquire and parse playlist from Spotify', async function(){
const playlist = await getSpotifyPlaylist('https://open.spotify.com/playlist/27OFA3NDwoLWtmdMvowA3S');
assert.strictEqual(playlist.name, 'The Best Yoga & Cool-Down Songs');
assert.strictEqual(playlist.type, 'playlist');
assert.strictEqual(playlist.tracks.items.length, 10);
});
});