Skip to content

Commit bd0c2fe

Browse files
committed
test: fix path checking on Windows
1 parent 3304486 commit bd0c2fe

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/main/files.spec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* @vitest-environment node
33
*/
44

5+
import path from 'node:path';
6+
57
import { BrowserWindow, app, dialog } from 'electron';
68
import fs from 'fs-extra';
79
import { type Mock, beforeEach, describe, expect, it, vi } from 'vitest';
@@ -217,7 +219,9 @@ describe('files', () => {
217219

218220
await deleteUserData('my-fiddle');
219221

220-
expect(fs.remove).toHaveBeenCalledWith('/fake/appData/my-fiddle');
222+
expect(fs.remove).toHaveBeenCalledWith(
223+
path.resolve('/fake/appData/my-fiddle'),
224+
);
221225
});
222226

223227
it.each([

0 commit comments

Comments
 (0)