From 1789cd1bcb3e15c73b5a58c84912bbefeb036c2c Mon Sep 17 00:00:00 2001 From: Asher Date: Wed, 5 May 2021 11:03:04 -0500 Subject: [PATCH] Move temp test dirs under a `tests` sub-directory This is to match the other tests that create temp directories. It also lets you clean up test temp directories all at once separately from other non-test temporary directories. --- test/utils/helpers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/utils/helpers.ts b/test/utils/helpers.ts index 96a772b9..df84ec1f 100644 --- a/test/utils/helpers.ts +++ b/test/utils/helpers.ts @@ -20,8 +20,8 @@ export const loggerModule = { * These directories are placed under a single temporary code-server directory. */ export async function tmpdir(testName: string): Promise { - const dir = path.join(os.tmpdir(), "code-server") + const dir = path.join(os.tmpdir(), "code-server/tests") await fs.promises.mkdir(dir, { recursive: true }) - return await fs.promises.mkdtemp(path.join(dir, `test-${testName}-`), { encoding: "utf8" }) + return await fs.promises.mkdtemp(path.join(dir, `${testName}-`), { encoding: "utf8" }) }