Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/FoxxMD/multi-scrobbler. Scrobble plays from multiple sources to multiple clients docs.multi-scrobbler.app
deezer docker jellyfin koito lastfm listenbrainz maloja mopidy mpris music music-assistant plex scrobble self-hosted spotify subsonic tautulli youtube-music
Something went wrong. Try again.
1.2 kB · 39 lines
TypeScript
123456789101112131415161718192021222324252627282930313233343536373839import { loggerDebug } from "@foxxmd/logging";import EventEmitter from "events";import { describe, it } from 'mocha';import type {SonosData} from "../../common/infrastructure/config/source/sonos.ts";import { SonosSource } from "../../sources/SonosSource.ts";import * as dotenv from 'dotenv';import path from 'path';import { getPathFromCWD } from "../../common/index.ts";
const envPath = path.join(getPathFromCWD(), '.env');dotenv.config({ path: envPath });
const createSource = async (data: SonosData): Promise<SonosSource> => { const source = new SonosSource('Test', { id: `test-${Date.now()}`, data, options: {} }, { localUrl: new URL('http://test'), configDir: 'test', logger: loggerDebug, version: 'test' }, new EventEmitter()); await source.buildInitData(); return source;}
describe('#Sonos', function() {
before(function () { if (process.env.SONOS_TEST !== 'true') { this.skip(); } });
it('does stuff', async function() {
const s = await createSource({host: process.env.SONOS_HOST_TEST!}); await s.checkConnection(); await s.getRecentlyPlayed(); const f = 1; });
});