From 19db4e3d71e6fca812fdc2869bbef04ff372aa22 Mon Sep 17 00:00:00 2001 From: "Hung-Han (Henry) Chen" Date: Fri, 29 Oct 2021 15:50:57 +0300 Subject: [PATCH] Add comments Signed-off-by: Hung-Han (Henry) Chen --- src/common/__tests__/system-ca.test.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/common/__tests__/system-ca.test.ts b/src/common/__tests__/system-ca.test.ts index 5fb8669978..d3b0e184f6 100644 --- a/src/common/__tests__/system-ca.test.ts +++ b/src/common/__tests__/system-ca.test.ts @@ -37,7 +37,12 @@ describe("inject CA for Mac", () => { const deps = { ...dependencies, ...devDependencies }; - // skip the test if mac-ca is not installed + /** + * The test to ensure using getMacRootCA + injectCAs injects CAs in the same way as using + * the auto injection (require('mac-ca')) + * + * Skip the test if mac-ca is not installed, or os is not darwin + */ (deps["mac-ca"] && os.platform().includes("darwin") ? it: it.skip)("should inject the same ca as mac-ca", async () => { const osxCAs = await getMacRootCA(); @@ -66,7 +71,12 @@ describe("inject CA for Windows", () => { const deps = { ...dependencies, ...devDependencies }; - // skip the test if win-ca is not installed + /** + * The test to ensure using win-ca/api injects CAs in the same way as using + * the auto injection (require('win-ca').inject('+')) + * + * Skip the test if win-ca is not installed, or os is not win32 + */ (deps["win-ca"] && os.platform().includes("win32") ? it: it.skip)("should inject the same ca as winca.inject('+')", async () => { const winCAs = await getWinRootCA();