/
Alex_Ural
/
opencode
Обзор
Документация
Войти
/
Alex_Ural
/
opencode
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
packages/core/test/global.test.ts
16 строк
533 B
Dax Raad
core: allow agents to access global tmp directory without permission prompts
01 май 2026, 22:35
01 май 2026, 22:35
c2609cb
Код
Авторство
О чём код?
import { describe, expect, test } from "bun:test" import fs from "fs/promises" import os from "os" import path from "path" import { Global } from "@opencode-ai/core/global" describe("global paths", () => { test("tmp path is under the system temp directory", () => { expect(Global.Path.tmp).toBe(path.join(os.tmpdir(), "opencode")) expect(Global.make().tmp).toBe(Global.Path.tmp) }) test("tmp path is created on module load", async () => { expect((await fs.stat(Global.Path.tmp)).isDirectory()).toBe(true) }) })