Add tests to action
All checks were successful
ci / build-image (push) Successful in 59s
ci / test-image (push) Successful in 8s

This commit is contained in:
Jonathan Cremin 2025-06-12 18:18:57 +01:00
parent 91d9af097d
commit 4dfd6e93b2
8 changed files with 139 additions and 48 deletions

View file

@ -1,18 +1,23 @@
import 'should';
import * as youtube from '../../lib/services/youtube/index.js';
import "should";
import * as youtube from "../../lib/services/youtube/index.js";
describe('Youtube', function(){
describe('lookup', function(){
it('should find album by lookup', async function (){
const result = await youtube.lookupId('6JnGBs88sL0');
result.name.should.equal('Say It Right');
describe("Youtube", function() {
describe("lookup", function() {
it("should find album by lookup", async function() {
const result = await youtube.lookupId("6JnGBs88sL0");
result.name.should.equal("Say It Right");
});
});
describe('search', function(){
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'});
result.name.should.equal('Aesop Rock - Zero Dark Thirty (Official Video)');
describe("search", function() {
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"
});
result.name.should.startWith("Aesop Rock - Zero Dark Thirty");
});
});
});