From b332250f646d0c45e7fcf3e5e62a5cad598ca117 Mon Sep 17 00:00:00 2001 From: Cecilia Sanare Date: Thu, 15 Feb 2024 13:04:20 -0600 Subject: [PATCH] chore: swap to v8 code coverage to get back to 100% --- jest.config.ts | 2 ++ src/hooks/index.ts | 3 ++- src/index.ts | 3 ++- src/tests/index.tsx | 3 ++- src/tests/wrap.tsx | 4 ++++ 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/jest.config.ts b/jest.config.ts index 27cb5f1..30cc909 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -8,6 +8,8 @@ export default { roots: ['/src'], testEnvironment: '@happy-dom/jest-environment', + coverageProvider: 'v8', + transform: { '^.+\\.(t|j)sx?$': ['@swc/jest', config], }, diff --git a/src/hooks/index.ts b/src/hooks/index.ts index f587eee..0d9b19c 100644 --- a/src/hooks/index.ts +++ b/src/hooks/index.ts @@ -1,4 +1,4 @@ -/* istanbul ignore file */ +/* c8 ignore start */ import classNames from 'classnames'; export * from './use-cached-state'; @@ -6,3 +6,4 @@ export * from './use-effect'; export * from './use-subtle-crypto'; export { classNames }; +/* c8 ignore end */ diff --git a/src/index.ts b/src/index.ts index 08d69bd..7a13889 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,5 @@ -/* istanbul ignore file */ +/* c8 ignore start */ export * as crypto from './utils/subtle-crypto'; export * from './hooks'; export * from './tests'; +/* c8 ignore end */ diff --git a/src/tests/index.tsx b/src/tests/index.tsx index 10761ed..1d0c142 100644 --- a/src/tests/index.tsx +++ b/src/tests/index.tsx @@ -1,2 +1,3 @@ -/* istanbul ignore file */ +/* c8 ignore start */ export * from './wrap'; +/* c8 ignore end */ diff --git a/src/tests/wrap.tsx b/src/tests/wrap.tsx index ebb1ac0..60a29d7 100644 --- a/src/tests/wrap.tsx +++ b/src/tests/wrap.tsx @@ -42,7 +42,11 @@ export function wrap( }; }; } + +// For some reason its marking the namespace as untested... ? +/* c8 ignore start */ export namespace wrap { + /* c8 ignore end */ export function concat(...wrappers: ReturnType[]): ReturnType { return async (component: SupportedComponentFormats) => { let result;