2022-06-25 00:33:38 +08:00
|
|
|
import { clean, tmpdir } from "../utils/helpers"
|
|
|
|
import { runCodeServerCommand } from "../utils/runCodeServerCommand"
|
|
|
|
|
|
|
|
describe("--install-extension", () => {
|
|
|
|
const testName = "installExtension"
|
|
|
|
let tempDir: string
|
|
|
|
let setupFlags: string[]
|
|
|
|
|
|
|
|
beforeEach(async () => {
|
|
|
|
await clean(testName)
|
|
|
|
tempDir = await tmpdir(testName)
|
|
|
|
setupFlags = ["--extensions-dir", tempDir]
|
|
|
|
})
|
2022-08-10 04:41:37 +08:00
|
|
|
it("should use EXTENSIONS_GALLERY when set", async () => {
|
2023-05-16 12:54:37 +08:00
|
|
|
const extName = "author.extension"
|
2022-08-10 04:41:37 +08:00
|
|
|
const { stderr } = await runCodeServerCommand([...setupFlags, "--install-extension", extName], {
|
|
|
|
EXTENSIONS_GALLERY: "{}",
|
|
|
|
})
|
|
|
|
expect(stderr).toMatch("No extension gallery service configured")
|
|
|
|
})
|
2022-06-25 00:33:38 +08:00
|
|
|
})
|