2021-11-22 00:49:22 +08:00
|
|
|
import { setupVcpkg } from "../vcpkg"
|
2021-11-22 03:54:12 +08:00
|
|
|
import { testBin, setupTmpDir } from "../../utils/tests/test-helpers"
|
2021-11-22 00:49:22 +08:00
|
|
|
|
|
|
|
jest.setTimeout(300000)
|
2022-03-12 09:48:28 +08:00
|
|
|
async function testVcpkg(directory: string) {
|
2021-11-22 03:54:12 +08:00
|
|
|
const { binDir } = await setupVcpkg("", directory, "")
|
2021-11-22 00:49:22 +08:00
|
|
|
await testBin("vcpkg", ["--version"], binDir)
|
|
|
|
return binDir
|
|
|
|
}
|
|
|
|
|
|
|
|
describe("setup-vcpkg", () => {
|
2021-11-22 03:54:12 +08:00
|
|
|
let directory: string
|
|
|
|
beforeAll(async () => {
|
|
|
|
directory = await setupTmpDir("vcpkg")
|
|
|
|
})
|
|
|
|
|
2021-11-22 00:49:22 +08:00
|
|
|
it("should setup vcpkg", async () => {
|
2022-03-12 09:48:28 +08:00
|
|
|
await testVcpkg(directory)
|
2021-11-22 00:49:22 +08:00
|
|
|
})
|
|
|
|
})
|