Skip to content

Commit

Permalink
fix: Fix logger used for tests to always be 'noop'
Browse files Browse the repository at this point in the history
Cleans up logging output during tests
  • Loading branch information
FoxxMD committed Feb 19, 2024
1 parent 69e15b3 commit ec897b1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/backend/tests/jellyfin/jellyfin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('Jellyfin Payload Parsing', function () {

describe('Correctly detects events as valid/invalid', function () {

const jfSource = new JellyfinSource('Test', {data: {}}, {localUrl: 'test', configDir: 'test', logger: getLogger({}, 'Test')}, new EventEmitter());
const jfSource = new JellyfinSource('Test', {data: {}}, {localUrl: 'test', configDir: 'test', logger: getLogger({}, 'noop')}, new EventEmitter());

it('Should parse PlayProgress with Audio ItemType as valid event', async function () {
const fixture = dataAsFixture(samplePayload[0]);
Expand Down
2 changes: 1 addition & 1 deletion src/backend/tests/player/player.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { playObjDataMatch } from "../../utils.js";
import dayjs from "dayjs";
import clone from "clone";

const logger = getLogger({});
const logger = getLogger({}, 'noop');

const newPlay = generatePlay({duration: 300});

Expand Down
2 changes: 1 addition & 1 deletion src/backend/tests/scrobbler/TestScrobbler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import request from "superagent";
export class TestScrobbler extends AbstractScrobbleClient {

constructor() {
const logger = getLogger({});
const logger = getLogger({}, 'noop');
const notifier = new Notifiers(new EventEmitter(), new EventEmitter(), new EventEmitter());
super('test', 'Test', {name: 'test'}, notifier, new EventEmitter(), logger);
}
Expand Down

0 comments on commit ec897b1

Please sign in to comment.