1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Mock win-ca/api

Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com>
This commit is contained in:
Hung-Han (Henry) Chen 2021-11-01 09:12:53 +02:00
parent d806211463
commit 74045fabfa
No known key found for this signature in database
GPG Key ID: 54B44603D251B788
3 changed files with 1 additions and 3 deletions

View File

@ -84,7 +84,6 @@ const deps = { ...dependencies, ...devDependencies };
it("should inject the same ca as winca.inject('+')", async () => {
const winCAs = await getWinRootCA();
// @ts-ignore
const wincaAPI = await import("win-ca/api");
wincaAPI.inject("+", winCAs);
@ -101,7 +100,6 @@ const deps = { ...dependencies, ...devDependencies };
it("shouldn't included the expired DST Root CA X3 on Windows", async () => {
const winCAs = await getWinRootCA();
// @ts-ignore
const wincaAPI = await import("win-ca/api");
wincaAPI.inject("true", winCAs);

View File

@ -20,7 +20,6 @@
*/
import { isMac, isWindows } from "./vars";
// @ts-expect-error winca/api module doesn't have a type definition
import wincaAPI from "win-ca/api";
import https from "https";
import { promiseExec } from "./utils/promise-exec";

1
types/mocks.d.ts vendored
View File

@ -20,6 +20,7 @@
*/
declare module "mac-ca"
declare module "win-ca"
declare module "win-ca/api"
declare module "@hapi/call"
declare module "@hapi/subtext"