mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-11 03:38:07 +00:00
test(embeddings): match metadata paths on Windows
This commit is contained in:
parent
390e18a2fe
commit
d651360c60
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue