|
1 | 1 | import which from "which" |
2 | | -import { testBin } from "../../utils/tests/test-helpers" |
3 | 2 | import { setupMSVC } from "../msvc" |
4 | 3 |
|
5 | 4 | jest.setTimeout(300000) |
6 | 5 | describe("setup-msvc", () => { |
7 | | - it("should setup the pre-installed msvc", async () => { |
| 6 | + it("should setup the pre-installed msvc", () => { |
8 | 7 | try { |
9 | 8 | if (process.platform !== "win32") { |
10 | 9 | return |
11 | 10 | } |
12 | | - await setupMSVC("", "", process.arch) |
13 | | - await testBin("cl", []) |
14 | | - console.log(which("cl")) |
| 11 | + setupMSVC("", "", process.arch) |
| 12 | + console.log(which.sync("cl")) |
15 | 13 | } catch (e) { |
16 | 14 | // TODO |
17 | 15 | console.error(e) |
18 | 16 | } |
19 | 17 | }) |
20 | 18 |
|
21 | | - it("should setup msvc 2022", async () => { |
| 19 | + it("should setup msvc 2022", () => { |
22 | 20 | try { |
23 | 21 | if (process.platform !== "win32") { |
24 | 22 | return |
25 | 23 | } |
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")) |
29 | 26 | } catch (e) { |
30 | 27 | // TODO |
31 | 28 | console.error(e) |
32 | 29 | } |
33 | 30 | }) |
34 | 31 |
|
35 | | - it("should setup msvc 2019", async () => { |
| 32 | + it("should setup msvc 2019", () => { |
36 | 33 | try { |
37 | 34 | if (process.platform !== "win32") { |
38 | 35 | return |
39 | 36 | } |
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")) |
43 | 39 | } catch (e) { |
44 | 40 | // TODO |
45 | 41 | console.error(e) |
46 | 42 | } |
47 | 43 | }) |
48 | 44 |
|
49 | | - it("should setup msvc 2017", async () => { |
| 45 | + it("should setup msvc 2017", () => { |
50 | 46 | try { |
51 | 47 | if (process.platform !== "win32") { |
52 | 48 | return |
53 | 49 | } |
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")) |
57 | 52 | } catch (e) { |
58 | 53 | // TODO |
59 | 54 | console.error(e) |
60 | 55 | } |
61 | 56 | }) |
62 | 57 |
|
63 | | - it("should setup msvc 2015", async () => { |
| 58 | + it("should setup msvc 2015", () => { |
64 | 59 | try { |
65 | 60 | if (process.platform !== "win32") { |
66 | 61 | return |
67 | 62 | } |
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")) |
71 | 65 | } catch (e) { |
72 | 66 | // TODO |
73 | 67 | console.error(e) |
|
0 commit comments