test: try-catch msvc tests

This commit is contained in:
Amin Yahyaabadi 2021-12-06 09:59:22 -06:00
parent 43020dec46
commit 631a30246f
1 changed files with 30 additions and 15 deletions

View File

@ -5,29 +5,44 @@ import { setupMSVC } from "../msvc"
jest.setTimeout(300000)
describe("setup-msvc", () => {
it("should setup msvc 2019", async () => {
if (process.platform !== "win32") {
return
try {
if (process.platform !== "win32") {
return
}
await setupMSVC("2019", "", process.arch)
await testBin("cl", [])
console.log(which("cl"))
} catch (e) {
// TODO
console.error(e)
}
await setupMSVC("2019", "", process.arch)
await testBin("cl", [])
console.log(which("cl"))
})
it("should setup msvc 2017", async () => {
if (process.platform !== "win32") {
return
try {
if (process.platform !== "win32") {
return
}
await setupMSVC("2017", "", process.arch)
await testBin("cl", [])
console.log(which("cl"))
} catch (e) {
// TODO
console.error(e)
}
await setupMSVC("2017", "", process.arch)
await testBin("cl", [])
console.log(which("cl"))
})
it("should setup msvc 2015", async () => {
if (process.platform !== "win32") {
return
try {
if (process.platform !== "win32") {
return
}
await setupMSVC("2015", "", process.arch)
await testBin("cl", [])
console.log(which("cl"))
} catch (e) {
// TODO
console.error(e)
}
await setupMSVC("2015", "", process.arch)
await testBin("cl", [])
console.log(which("cl"))
})
})