test: test all the msvc version installations

This commit is contained in:
Amin Yahyaabadi 2021-12-05 09:04:06 -06:00
parent 1d04cc2855
commit 73ec89a099
1 changed files with 20 additions and 5 deletions

View File

@ -1,18 +1,33 @@
import which from "which"
import { testBin } from "../../utils/tests/test-helpers"
import { setupMSVC } from "../msvc"
jest.setTimeout(300000)
describe("setup-msvc", () => {
it("should setup msvc", async () => {
it("should setup msvc 2019", async () => {
if (process.platform !== "win32") {
return
}
await setupMSVC("2019", "", process.arch)
await testBin("cl", [])
console.log(which("cl"))
})
try {
await testBin("cl", [])
} catch (err) {
// TODO see #1
it("should setup msvc 2017", async () => {
if (process.platform !== "win32") {
return
}
await setupMSVC("2017", "", process.arch)
await testBin("cl", [])
console.log(which("cl"))
})
it("should setup msvc 2015", async () => {
if (process.platform !== "win32") {
return
}
await setupMSVC("2015", "", process.arch)
await testBin("cl", [])
console.log(which("cl"))
})
})