Use the + mode

Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com>
This commit is contained in:
Hung-Han (Henry) Chen committed 2021-11-02 16:35:08 +02:00
1 parent 30254400e6
commit 4746e4cf41
2 files changed
+5 -2

No files matched your search

+4 -1
View File
@@ -70,7 +70,10 @@ describe("inject CA for Windows", () => {
(deps["win-ca"] && os.platform().includes("win32") ? it: it.skip)("should inject the same ca as winca.inject('+')", async () => {
const winCAs = await getWinRootCA();
injectCAs(winCAs);
// @ts-ignore
const wincaAPI = await import("win-ca/api");
wincaAPI.inject("+", winCAs);
const injected = https.globalAgent.options.ca;
const winca = await import("win-ca");
+1 -1
View File
@@ -86,7 +86,7 @@ if (isMac) {
if (isWindows) {
getWinRootCA().then((winRootCAs) => {
injectCAs(winRootCAs);
winca.inject("+", winRootCAs);
}).catch((error) => {
console.error(`[WIN-CA]: Error injecting root CAs from Windows. ${error?.message}`);
});