From 077d833222eca91c6461c39282618888b2e0c594 Mon Sep 17 00:00:00 2001 From: JohnAlbin Date: Wed, 22 Nov 2023 21:11:57 +0800 Subject: [PATCH] test(next-drupal): add tooling to test code coverage Fixes #609 --- jest.config.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/jest.config.ts b/jest.config.ts index 3ab4fbfb..3e15694f 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -18,6 +18,18 @@ const config: Config.InitialOptions = { isolatedModules: true, }, }, + coverageProvider: "v8", + collectCoverage: true, + collectCoverageFrom: ["./packages/*/src/**"], + coveragePathIgnorePatterns: ["./packages/next-drupal/src/get-*"], + coverageThreshold: { + global: { + statements: 63.11, + branches: 72.7, + functions: 76.56, + lines: 63.11, + }, + }, } export default config