Skip to content

Commit ba007ed

Browse files
committed
ci: don't output code coverage table in logs
Problem: c8 was not given a reporter, therefore it defaulted to `text` which is the terminal. Solution: Set it to `lcov`, which is what we have been using previously. Note: More work may be needed on the .c8rc.json files. We might not need the one for core/ anymore. They may not be configured in the optimal way. Is it behaving how we want it to?
1 parent c44fa30 commit ba007ed

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

packages/amazonq/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@
5757
"lint": "true",
5858
"watch": "npm run clean && npm run buildScripts && tsc -watch -p ./",
5959
"testCompile": "npm run clean && npm run buildScripts && npm run compileOnly",
60-
"test": "npm run testCompile && c8 --allowExternal ts-node ../core/scripts/test/launchTest.ts unit dist/test/unit/index.js ../core/dist/src/testFixtures/workspaceFolder",
61-
"testE2E": "npm run testCompile && c8 --allowExternal ts-node ../core/scripts/test/launchTest.ts e2e dist/test/e2e/index.js ../core/dist/src/testFixtures/workspaceFolder",
62-
"testWeb": "npm run compileDev && c8 --allowExternal ts-node ../core/scripts/test/launchTest.ts web dist/test/web/testRunnerWebCore.js",
60+
"test": "npm run testCompile && c8 --reporter lcov --allowExternal ts-node ../core/scripts/test/launchTest.ts unit dist/test/unit/index.js ../core/dist/src/testFixtures/workspaceFolder",
61+
"testE2E": "npm run testCompile && c8 --reporter lcov --allowExternal ts-node ../core/scripts/test/launchTest.ts e2e dist/test/e2e/index.js ../core/dist/src/testFixtures/workspaceFolder",
62+
"testWeb": "npm run compileDev && c8 --reporter lcov --allowExternal ts-node ../core/scripts/test/launchTest.ts web dist/test/web/testRunnerWebCore.js",
6363
"webRun": "npx @vscode/test-web --open-devtools --browserOption=--disable-web-security --waitForDebugger=9222 --extensionDevelopmentPath=. .",
6464
"webWatch": "npm run clean && npm run buildScripts && webpack --mode development --watch",
6565
"serve": "webpack serve --config-name mainServe --mode development",

packages/toolkit/.c8rc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"report-dir": "../../coverage/toolkit",
3+
"reporter": ["lcov"],
4+
"all": true,
5+
"exclude": ["**/test*/**", "**/node_modules/**"]
6+
}

packages/toolkit/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@
6969
"webCompile": "npm run clean && npm run buildScripts && webpack --config-name web",
7070
"webRun": "npx @vscode/test-web --open-devtools --browserOption=--disable-web-security --waitForDebugger=9222 --extensionDevelopmentPath=. .",
7171
"testCompile": "npm run clean && npm run buildScripts && npm run compileOnly",
72-
"test": "npm run testCompile && c8 --allowExternal ts-node ../core/scripts/test/launchTest.ts unit dist/test/unit/index.js ../core/dist/src/testFixtures/workspaceFolder",
73-
"testE2E": "npm run testCompile && c8 --allowExternal ts-node ../core/scripts/test/launchTest.ts e2e dist/test/e2e/index.js ../core/dist/src/testFixtures/workspaceFolder",
74-
"testInteg": "npm run testCompile && c8 --allowExternal ts-node ../core/scripts/test/launchTest.ts integration dist/test/integ/index.js ../core/dist/src/testFixtures/workspaceFolder",
72+
"test": "npm run testCompile && c8 --reporter lcov --allowExternal ts-node ../core/scripts/test/launchTest.ts unit dist/test/unit/index.js ../core/dist/src/testFixtures/workspaceFolder",
73+
"testE2E": "npm run testCompile && c8 --reporter lcov --allowExternal ts-node ../core/scripts/test/launchTest.ts e2e dist/test/e2e/index.js ../core/dist/src/testFixtures/workspaceFolder",
74+
"testInteg": "npm run testCompile && c8 --reporter lcov --allowExternal ts-node ../core/scripts/test/launchTest.ts integration dist/test/integ/index.js ../core/dist/src/testFixtures/workspaceFolder",
7575
"package": "ts-node ../../scripts/package.ts",
7676
"lint": "true",
7777
"createRelease": "ts-node ../../scripts/createRelease.ts",

0 commit comments

Comments
 (0)