mirror of
https://github.com/BradNut/personal-website-sveltekit
synced 2025-09-08 23:20:18 +00:00
17 lines
552 B
TypeScript
17 lines
552 B
TypeScript
import { describe, it, expect } from 'vitest';
|
|
import { fetchBandcampAlbums } from './fetchBandcampAlbums';
|
|
|
|
describe('test fetchBandcampAlbums', () => {
|
|
it('fetches bandcamp albums', async () => {
|
|
const albums = await fetchBandcampAlbums();
|
|
expect(albums).not.toBeNull();
|
|
expect(albums).toBeTruthy();
|
|
expect(albums?.length).toBeGreaterThan(0);
|
|
for (const album of albums) {
|
|
expect(album?.artist).toHaveLength;
|
|
expect(album?.artwork).toHaveLength;
|
|
expect(album?.title).toHaveLength;
|
|
expect(album?.url).toHaveLength;
|
|
}
|
|
});
|
|
});
|