( cwd: string, homeDir: string, files: Record<string, string> )
| 70 | } |
| 71 | |
| 72 | function createStoreWithFs( |
| 73 | cwd: string, |
| 74 | homeDir: string, |
| 75 | files: Record<string, string> |
| 76 | ): { store: ProfileStore; fs: MemoryFs } { |
| 77 | const fs = new MemoryFs(files); |
| 78 | const locator = new ConfigLocator({ fs, homeDir }); |
| 79 | const store = new ProfileStore({ fs, locator }); |
| 80 | return { store, fs }; |
| 81 | } |
| 82 | |
| 83 | describe("ProfileStore", () => { |
| 84 | const homeDir = "/home/user"; |