Archived
1
0
This repository has been archived on 2024-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
code-server/test/integration/installExtension.test.ts
Asher 73e615da4e
Fix extension installation test
This throws now that the exit is non-zero.
2024-04-05 17:39:21 -08:00

23 lines
702 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"
await expect(
runCodeServerCommand([...setupFlags, "--install-extension", extName], {
EXTENSIONS_GALLERY: "{}",
}),
).rejects.toThrow("No extension gallery service configured")
})
})