feat: add desktop repo (#1071)
This commit is contained in:
29
packages/desktop/test/fakePaths.ts
Normal file
29
packages/desktop/test/fakePaths.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import path from 'path'
|
||||
|
||||
export default function makeFakePaths(tmpDir: string) {
|
||||
const Paths = {
|
||||
get userDataDir(): string {
|
||||
return tmpDir
|
||||
},
|
||||
get documentsDir(): string {
|
||||
return tmpDir
|
||||
},
|
||||
get tempDir(): string {
|
||||
return tmpDir
|
||||
},
|
||||
get extensionsDirRelative(): string {
|
||||
return 'Extensions'
|
||||
},
|
||||
get extensionsDir(): string {
|
||||
return path.join(Paths.userDataDir, 'Extensions')
|
||||
},
|
||||
get extensionsMappingJson(): string {
|
||||
return path.join(Paths.extensionsDir, 'mapping.json')
|
||||
},
|
||||
get windowPositionJson(): string {
|
||||
return path.join(Paths.userDataDir, 'window-position.json')
|
||||
},
|
||||
}
|
||||
|
||||
return Paths
|
||||
}
|
||||
Reference in New Issue
Block a user