From d651360c607d353c475afb4a6c032ee5c246cf01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20Magyar?= Date: Sat, 3 Oct 2026 18:09:02 +0100 Subject: [PATCH] test(embeddings): match metadata paths on Windows --- gitnexus/test/unit/run-analyze-fts-repair.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gitnexus/test/unit/run-analyze-fts-repair.test.ts b/gitnexus/test/unit/run-analyze-fts-repair.test.ts index 1ec3a4d8f..6070e5814 100644 --- a/gitnexus/test/unit/run-analyze-fts-repair.test.ts +++ b/gitnexus/test/unit/run-analyze-fts-repair.test.ts @@ -1,5 +1,6 @@ import { execSync } from 'child_process'; import fs from 'fs/promises'; +import { basename } from 'node:path'; import { afterEach, beforeEach, describe, expect, it, vi, type Mock } from 'vitest'; import { getStoragePaths, @@ -3357,7 +3358,7 @@ describe('runFullAnalysis embedding-checkpoint resilience (#2790 review)', () => pipeline: async (options) => { if (failure === 'metadata') { vi.spyOn(fs, 'rename').mockImplementation(async (source, destination) => { - if (String(destination).endsWith('/gitnexus.json')) + if (basename(String(destination)) === 'gitnexus.json') throw new Error('metadata write failed'); return rename(source, destination); });