Skip to content

Commit

Permalink
test: try-catch msvc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Dec 6, 2021
1 parent 43020de commit 631a302
Showing 1 changed file with 30 additions and 15 deletions.
45 changes: 30 additions & 15 deletions src/msvc/__tests__/msvc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
})
})

0 comments on commit 631a302

Please sign in to comment.