From b4a5a17d497009dd068fe55e2e0ca11d6b5de7bf Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Fri, 24 Apr 2020 06:57:36 -0700 Subject: [PATCH] Add jest coverage reporters (#1051) Summary: I want to track that data continuously. HTML is useful to investigate, lcov got loads of external tools that support it and JSON is quite useful to parse and write to a DB. Pull Request resolved: https://github.com/facebook/flipper/pull/1051 Test Plan: ``` yarn test --coverage open coverage/index.html ``` Reviewed By: jknoxville Differential Revision: D21228144 Pulled By: passy fbshipit-source-id: dc6d853c84c21e941614cf7e5da0fc4fe7174564 --- desktop/.gitignore | 1 + desktop/package.json | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/desktop/.gitignore b/desktop/.gitignore index 384077f5f..bb7ccb487 100644 --- a/desktop/.gitignore +++ b/desktop/.gitignore @@ -3,3 +3,4 @@ node_modules/ *.tsbuildinfo /static/defaultPlugins/index.json /app/src/defaultPlugins/index.tsx +/coverage diff --git a/desktop/package.json b/desktop/package.json index 6ade736e7..65cc4f88f 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -104,7 +104,12 @@ "^flipper-pkg$": "/pkg/src", "^flipper-pkg-lib$": "/pkg-lib/src" }, - "clearMocks": true + "clearMocks": true, + "coverageReporters": [ + "json-summary", + "lcov", + "html" + ] }, "devDependencies": { "@babel/code-frame": "^7.8.3",