未验证 提交 1789cd1b 编写于 作者: A Asher

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.
上级 52cf2fcf
...@@ -20,8 +20,8 @@ export const loggerModule = { ...@@ -20,8 +20,8 @@ export const loggerModule = {
* These directories are placed under a single temporary code-server directory. * These directories are placed under a single temporary code-server directory.
*/ */
export async function tmpdir(testName: string): Promise<string> { export async function tmpdir(testName: string): Promise<string> {
const dir = path.join(os.tmpdir(), "code-server") const dir = path.join(os.tmpdir(), "code-server/tests")
await fs.promises.mkdir(dir, { recursive: true }) 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" })
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册