combine.fm/test/services/youtube.js

19 lines
662 B
JavaScript
Raw Permalink Normal View History

2015-06-03 21:45:54 -07:00
import 'should';
2020-01-18 10:19:20 +00:00
import * as youtube from '../../lib/services/youtube/index.js';
describe('Youtube', function(){
2017-07-20 14:31:07 +01:00
describe('lookup', function(){
2018-04-30 22:20:01 +01:00
it('should find album by lookup', async function (){
const result = await youtube.lookupId('6JnGBs88sL0');
2018-04-08 16:31:46 +01:00
result.name.should.equal('Say It Right');
2017-07-20 14:31:07 +01:00
});
});
describe('search', function(){
2018-04-30 22:20:01 +01:00
it('should find album by search', async function (){
const result = await youtube.search({type: 'track', artist: {name: 'Aesop Rock'}, album: {name: 'Skeconsthon'}, name: 'Zero Dark Thirty'});
2017-10-24 19:45:41 +01:00
result.name.should.equal('Aesop Rock - Zero Dark Thirty (Official Video)');
});
});
});