mirror of
https://github.com/coder/code-server.git
synced 2024-11-23 03:37:19 +03:00
6745a46034
This is not a valid ID (to install a specific version you use @) and, quite strangely, Code is now returning an "extension not found" error if the ID is invalid, breaking the test since we expect it to error about the marketplace not existing.
22 lines
707 B
TypeScript
22 lines
707 B
TypeScript
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]
|
|
})
|
|
it("should use EXTENSIONS_GALLERY when set", async () => {
|
|
const extName = "author.extension"
|
|
const { stderr } = await runCodeServerCommand([...setupFlags, "--install-extension", extName], {
|
|
EXTENSIONS_GALLERY: "{}",
|
|
})
|
|
expect(stderr).toMatch("No extension gallery service configured")
|
|
})
|
|
})
|