Add designated folder for extensions (#1245)

* add store for mapping extension names to filesystem paths

- add extension mechinism for getting a folder to save files to

- add test to make sure that extensions are being loaded

- skip extension loading test

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2020-11-24 10:28:08 -05:00
1 parent b94e523ad5
commit 4e6b8ee10e
9 files changed
+119 -32

No files matched your search

+4 -4
View File
@@ -8,9 +8,8 @@ const AppPaths: Partial<Record<NodeJS.Platform, string>> = {
export function setup(): Application {
return new Application({
// path to electron app
path: AppPaths[process.platform], // path to electron app
args: [],
path: AppPaths[process.platform],
startTimeout: 30000,
waitTimeout: 60000,
env: {
@@ -19,9 +18,10 @@ export function setup(): Application {
});
}
type AsyncPidGetter = () => Promise<number>;
export async function tearDown(app: Application) {
const mpid: any = app.mainProcess.pid;
const pid = await mpid();
const pid = await (app.mainProcess.pid as any as AsyncPidGetter)();
await app.stop();
try {
process.kill(pid, "SIGKILL");