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 { loggerTest, loggerDebug } from "@foxxmd/logging";import { assert, expect } from 'chai';import EventEmitter from "events";import { describe, it } from 'mocha';import { SonosData } from "../../common/infrastructure/config/source/sonos.js";import { SonosSource } from "../../sources/SonosSource.js";import * as dotenv from 'dotenv';import path from 'path';import { projectDir } from "../../common/index.js";
const envPath = path.join(projectDir, '.env');dotenv.config({ path: envPath });
const createSource = async (data: SonosData): Promise<SonosSource> => { const source = new SonosSource('Test', { 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; });
});