test(core): disable npm audits in the test preload (#47222)

Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
This commit is contained in:
opencode-agent[bot] 2026-09-04 00:34:37 -05:00 committed by GitHub
parent dd417f1a6b
commit 03cb632435
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View file

@ -0,0 +1,5 @@
import { expect, test } from "bun:test"
test("disables public npm security audits", () => {
expect(process.env.NPM_CONFIG_AUDIT).toBe("false")
})

View file

@ -1,5 +1,6 @@
import path from "path"
process.env.OPENCODE_DB = ":memory:"
process.env.NPM_CONFIG_AUDIT = "false"
process.env.OPENCODE_MODELS_PATH = path.join(import.meta.dir, "plugin", "fixtures", "models-dev.json")
process.env.OPENCODE_DISABLE_MODELS_FETCH = "true"