From bb2e50ea8f0d8093c3978b937a964f86f9de8a32 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Tue, 1 Feb 2022 20:54:32 -0800 Subject: [PATCH] test: use which.sync in the msvc tests --- src/msvc/__tests__/msvc.test.ts | 36 ++++++++++++++------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/src/msvc/__tests__/msvc.test.ts b/src/msvc/__tests__/msvc.test.ts index 38595c67..586f1700 100644 --- a/src/msvc/__tests__/msvc.test.ts +++ b/src/msvc/__tests__/msvc.test.ts @@ -1,73 +1,67 @@ import which from "which" -import { testBin } from "../../utils/tests/test-helpers" import { setupMSVC } from "../msvc" jest.setTimeout(300000) describe("setup-msvc", () => { - it("should setup the pre-installed msvc", async () => { + it("should setup the pre-installed msvc", () => { try { if (process.platform !== "win32") { return } - await setupMSVC("", "", process.arch) - await testBin("cl", []) - console.log(which("cl")) + setupMSVC("", "", process.arch) + console.log(which.sync("cl")) } catch (e) { // TODO console.error(e) } }) - it("should setup msvc 2022", async () => { + it("should setup msvc 2022", () => { try { if (process.platform !== "win32") { return } - await setupMSVC("2022", "", process.arch) - await testBin("cl", []) - console.log(which("cl")) + setupMSVC("2022", "", process.arch) + console.log(which.sync("cl")) } catch (e) { // TODO console.error(e) } }) - it("should setup msvc 2019", async () => { + it("should setup msvc 2019", () => { try { if (process.platform !== "win32") { return } - await setupMSVC("2019", "", process.arch) - await testBin("cl", []) - console.log(which("cl")) + setupMSVC("2019", "", process.arch) + console.log(which.sync("cl")) } catch (e) { // TODO console.error(e) } }) - it("should setup msvc 2017", async () => { + it("should setup msvc 2017", () => { try { if (process.platform !== "win32") { return } - await setupMSVC("2017", "", process.arch) - await testBin("cl", []) - console.log(which("cl")) + setupMSVC("2017", "", process.arch) + console.log(which.sync("cl")) } catch (e) { // TODO console.error(e) } }) - it("should setup msvc 2015", async () => { + it("should setup msvc 2015", () => { try { if (process.platform !== "win32") { return } - await setupMSVC("2015", "", process.arch) - await testBin("cl", []) - console.log(which("cl")) + setupMSVC("2015", "", process.arch) + console.log(which.sync("cl")) } catch (e) { // TODO console.error(e)