tests: flatten renderer mock to src/nitro-renderer.mock.ts (drop __mocks__/)

The Jest-style __mocks__/ folder added one indirection for a single
file. Move the stub to src/nitro-renderer.mock.ts at src/ root next to
test-setup.ts, drop the folder, repoint the vitest alias, and update
the lone test that imports the helpers directly (useDoorbellState).

Same behaviour, one fewer directory.
This commit is contained in:
simoleo89
2026-05-16 11:37:33 +02:00
parent 8b4308af16
commit 803de20dfe
6 changed files with 11 additions and 11 deletions
@@ -4,7 +4,7 @@ import { RoomSessionDoorbellEvent } from '@nitrots/nitro-renderer';
import { act, cleanup, renderHook } from '@testing-library/react';
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import { useDoorbellState } from './useDoorbellState';
import { clearMockEventDispatcher, mockEventDispatcher } from '../../../__mocks__/nitro-renderer';
import { clearMockEventDispatcher, mockEventDispatcher } from '../../../nitro-renderer.mock';
// Server push helper — mirrors the renderer wire by emitting the same
// constants the SUT listens to. The real constructor takes a session