A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.
test(logger): remove the logger suite and its test runner
Hampus6a0529f548ab
diff --git a/packages/logger/package.json b/packages/logger/package.jsonindex 348ff0efe..fa6e044f3 100644--- a/packages/logger/package.json+++ b/packages/logger/package.json@@ -4,8 +4,6 @@"private": true,"type": "module","scripts": {- "test": "vitest run",- "test:watch": "vitest","typecheck": "tsc --noEmit"},"dependencies": {@@ -14,7 +12,6 @@},"devDependencies": {"@types/node": "catalog:",- "typescript": "catalog:ts7",- "vitest": "catalog:"+ "typescript": "catalog:ts7"}}diff --git a/packages/logger/src/__tests__/Logger.test.ts b/packages/logger/src/__tests__/Logger.test.tsdeleted file mode 100644index 2e3ae9d6b..000000000--- a/packages/logger/src/__tests__/Logger.test.ts+++ /dev/null@@ -1,39 +0,0 @@-// SPDX-License-Identifier: AGPL-3.0-or-later--import {createLogger, Logger} from '@fluxer/logger/src/Logger';-import pino, {type Logger as PinoLogger} from 'pino';-import {afterEach, describe, expect, it, vi} from 'vitest';--function readDestination(logger: PinoLogger): unknown {- return (logger as unknown as Record<symbol, unknown>)[pino.symbols.streamSym];-}--describe('Logger.child', () => {- afterEach(() => {- vi.restoreAllMocks();- vi.unstubAllEnvs();- });-- it('shares the parent destination instead of opening a new one', () => {- const parent = createLogger('logger-test', {environment: 'production'});- const child = parent.child({logger: 'ChildService'});- expect(child).toBeInstanceOf(Logger);- expect(readDestination(child.pino)).toBe(readDestination(parent.pino));- });-- it('does not construct a throwaway pino root logger', () => {- vi.stubEnv('FLUXER_ENV', 'production');- const parent = createLogger('logger-test', {environment: 'production'});- const destinationSpy = vi.spyOn(pino, 'destination');- const child = parent.child({logger: 'ChildService'});- expect(destinationSpy).not.toHaveBeenCalled();- expect(child.pino.bindings()['logger']).toBe('ChildService');- });-- it('keeps the parent bindings on the child', () => {- const parent = createLogger('logger-test', {environment: 'production'});- const child = parent.child({logger: 'ChildService'});- expect(child.pino.bindings()['service']).toBe('logger-test');- expect(child.pino.level).toBe(parent.pino.level);- });-});diff --git a/packages/logger/vitest.config.ts b/packages/logger/vitest.config.tsdeleted file mode 100644index 99766af5f..000000000--- a/packages/logger/vitest.config.ts+++ /dev/null@@ -1,3 +0,0 @@-// SPDX-License-Identifier: AGPL-3.0-or-later--export {default} from '../../tsconfigs/vitest.base.mts';