Skip to content

Commit bb2e50e

Browse files
committed
test: use which.sync in the msvc tests
1 parent 79da94e commit bb2e50e

File tree

1 file changed

+15
-21
lines changed

1 file changed

+15
-21
lines changed

src/msvc/__tests__/msvc.test.ts

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,67 @@
11
import which from "which"
2-
import { testBin } from "../../utils/tests/test-helpers"
32
import { setupMSVC } from "../msvc"
43

54
jest.setTimeout(300000)
65
describe("setup-msvc", () => {
7-
it("should setup the pre-installed msvc", async () => {
6+
it("should setup the pre-installed msvc", () => {
87
try {
98
if (process.platform !== "win32") {
109
return
1110
}
12-
await setupMSVC("", "", process.arch)
13-
await testBin("cl", [])
14-
console.log(which("cl"))
11+
setupMSVC("", "", process.arch)
12+
console.log(which.sync("cl"))
1513
} catch (e) {
1614
// TODO
1715
console.error(e)
1816
}
1917
})
2018

21-
it("should setup msvc 2022", async () => {
19+
it("should setup msvc 2022", () => {
2220
try {
2321
if (process.platform !== "win32") {
2422
return
2523
}
26-
await setupMSVC("2022", "", process.arch)
27-
await testBin("cl", [])
28-
console.log(which("cl"))
24+
setupMSVC("2022", "", process.arch)
25+
console.log(which.sync("cl"))
2926
} catch (e) {
3027
// TODO
3128
console.error(e)
3229
}
3330
})
3431

35-
it("should setup msvc 2019", async () => {
32+
it("should setup msvc 2019", () => {
3633
try {
3734
if (process.platform !== "win32") {
3835
return
3936
}
40-
await setupMSVC("2019", "", process.arch)
41-
await testBin("cl", [])
42-
console.log(which("cl"))
37+
setupMSVC("2019", "", process.arch)
38+
console.log(which.sync("cl"))
4339
} catch (e) {
4440
// TODO
4541
console.error(e)
4642
}
4743
})
4844

49-
it("should setup msvc 2017", async () => {
45+
it("should setup msvc 2017", () => {
5046
try {
5147
if (process.platform !== "win32") {
5248
return
5349
}
54-
await setupMSVC("2017", "", process.arch)
55-
await testBin("cl", [])
56-
console.log(which("cl"))
50+
setupMSVC("2017", "", process.arch)
51+
console.log(which.sync("cl"))
5752
} catch (e) {
5853
// TODO
5954
console.error(e)
6055
}
6156
})
6257

63-
it("should setup msvc 2015", async () => {
58+
it("should setup msvc 2015", () => {
6459
try {
6560
if (process.platform !== "win32") {
6661
return
6762
}
68-
await setupMSVC("2015", "", process.arch)
69-
await testBin("cl", [])
70-
console.log(which("cl"))
63+
setupMSVC("2015", "", process.arch)
64+
console.log(which.sync("cl"))
7165
} catch (e) {
7266
// TODO
7367
console.error(e)

0 commit comments

Comments
 (0)