From 71c53fdc7fc86b01d70102be61e300724caac040 Mon Sep 17 00:00:00 2001 From: Philippe Martin Date: Tue, 23 Jan 2024 12:03:32 +0100 Subject: [PATCH] fix windows path --- packages/backend/src/managers/modelsManager.spec.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/managers/modelsManager.spec.ts b/packages/backend/src/managers/modelsManager.spec.ts index 17ecfb74e..7ccded67a 100644 --- a/packages/backend/src/managers/modelsManager.spec.ts +++ b/packages/backend/src/managers/modelsManager.spec.ts @@ -64,5 +64,9 @@ test('getLocalModels should return an empty array if the models folder does not const manager = new ModelsManager('/home/user/aistudio'); const models = manager.getLocalModels(); expect(models).toEqual([]); - expect(existsSyncSpy).toHaveBeenCalledWith('/home/user/aistudio/models'); + if (process.platform === 'win32') { + expect(existsSyncSpy).toHaveBeenCalledWith('\\home\\user\\aistudio\\models'); + } else { + expect(existsSyncSpy).toHaveBeenCalledWith('/home/user/aistudio/models'); + } });