fix(test): improve logger mock path and add behavior-based repository tests

- Fix logger-performance test mock path to use bare module specifier
- Replace meaningless "should be defined" assertions in repositories test
  with behavior-based tests covering upsert, batch operations, queries,
  deletes, and error handling for both MaterialsToBeDeletedRepository
  and DiscreteMaterialPlanRepository

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Misaka
2026-04-05 08:16:40 +08:00
parent 406a8dfd2f
commit ae29f38d24
2 changed files with 586 additions and 63 deletions

View File

@@ -15,7 +15,7 @@ import {
import logger from '../../src/main/services/logger/index'
// Mock the logger to avoid noisy output during tests
vi.mock('../../src/main/services/logger/index', () => ({
vi.mock('../../src/main/services/logger', () => ({
default: {
debug: vi.fn(),
info: vi.fn(),