[tests] add silent reporter (#35547)
Adds silent reporter so you can run tests and only see the failed tests This helps reduce context agents use, if you're inclined to use agents: <img width="630" height="292" alt="Screenshot 2026-01-17 at 12 39 58 PM" src="https://github.com/user-attachments/assets/373b9803-59a6-4b9a-99f9-d74a7b41462e" />
Ricky committed
Jan 18, 2026 at 10:17 UTC
d87298ae166b84cf6fcc8f9dbc25d2e320309841
3 files changed
+58
package.json
+1
@@ -88,6 +88,7 @@
88
"jest-cli": "^29.4.2",
89
"jest-diff": "^29.4.2",
90
"jest-environment-jsdom": "^29.4.2",
91
+ "jest-silent-reporter": "^0.6.0",
92
"jest-snapshot-serializer-raw": "^1.2.0",
93
"minimatch": "^3.0.4",
94
"minimist": "^1.2.3",
scripts/jest/jest-cli.js
+19
@@ -112,6 +112,13 @@ const argv = yargs
112
type: 'boolean',
113
default: false,
114
},
115
+ silent: {
116
+ alias: 's',
117
+ describe: 'Use silent reporter with dot progress (minimal output).',
118
+ requiresArg: false,
119
+ type: 'boolean',
120
+ default: false,
121
+ },
122
}).argv;
123
124
function logError(message) {
@@ -312,6 +319,12 @@ function getCommandArgs() {
319
args.push('--maxConcurrency=10');
320
}
321
322
+ // Use silent reporter if requested.
323
+ if (argv.silent) {
324
+ args.push('--reporters=jest-silent-reporter');
325
+ args.push('--testLocationInResults');
326
+ }
327
+
328
// Push the remaining args onto the command.
329
// This will send args like `--watch` to Jest.
330
args.push(...argv._);
@@ -353,6 +366,12 @@ function getEnvars() {
366
envars.JEST_ENABLE_SOURCE_MAPS = 'inline';
367
}
368
369
+ if (argv.silent) {
370
+ // Enable dot output for jest-silent-reporter so that long test runs
371
+ // show progress and don't appear to be hung.
372
+ envars.JEST_SILENT_REPORTER_DOTS = true;
373
+ }
374
+
375
return envars;
376
}
377
yarn.lock
+38
@@ -3144,6 +3144,17 @@
3144
slash "^3.0.0"
3145
write-file-atomic "^4.0.2"
3146
3147
+"@jest/types@^26.6.2":
3148
+ version "26.6.2"
3149
+ resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e"
3150
+ integrity sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==
3151
+ dependencies:
3152
+ "@types/istanbul-lib-coverage" "^2.0.0"
3153
+ "@types/istanbul-reports" "^3.0.0"
3154
+ "@types/node" "*"
3155
+ "@types/yargs" "^15.0.0"
3156
+ chalk "^4.0.0"
3157
+
3158
"@jest/types@^29.6.3":
3159
version "29.6.3"
3160
resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59"
@@ -4166,6 +4177,13 @@
4177
resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15"
4178
integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==
4179
4180
+"@types/yargs@^15.0.0":
4181
+ version "15.0.20"
4182
+ resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.20.tgz#6d00a124c9f757427d4ca3cbc87daea778053c68"
4183
+ integrity sha512-KIkX+/GgfFitlASYCGoSF+T4XRXhOubJLhkLVtSfsRTe9jWMmuM2g28zQ41BtPTG7TRBb2xHW+LCNVE9QR/vsg==
4184
+ dependencies:
4185
+ "@types/yargs-parser" "*"
4186
+
4187
"@types/yargs@^17.0.8":
4188
version "17.0.32"
4189
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.32.tgz#030774723a2f7faafebf645f4e5a48371dca6229"
@@ -11611,6 +11629,14 @@ jest-runtime@^29.7.0:
11629
slash "^3.0.0"
11630
strip-bom "^4.0.0"
11631
11632
+jest-silent-reporter@^0.6.0:
11633
+ version "0.6.0"
11634
+ resolved "https://registry.yarnpkg.com/jest-silent-reporter/-/jest-silent-reporter-0.6.0.tgz#e9c63a3b1e3c80571d690d998faf842f576b6a60"
11635
+ integrity sha512-4nmS+5o7ycVlvbQOTx7CnGdbBtP2646hnDgQpQLaVhjHcQNHD+gqBAetyjRDlgpZ8+8N82MWI59K+EX2LsVk7g==
11636
+ dependencies:
11637
+ chalk "^4.0.0"
11638
+ jest-util "^26.0.0"
11639
+
11640
jest-snapshot-serializer-raw@^1.2.0:
11641
version "1.2.0"
11642
resolved "https://registry.yarnpkg.com/jest-snapshot-serializer-raw/-/jest-snapshot-serializer-raw-1.2.0.tgz#cd67afb5e5cc39d88d518b45e7320dd01ce55148"
@@ -11642,6 +11668,18 @@ jest-snapshot@^29.7.0:
11668
pretty-format "^29.7.0"
11669
semver "^7.5.3"
11670
11671
+jest-util@^26.0.0:
11672
+ version "26.6.2"
11673
+ resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.2.tgz#907535dbe4d5a6cb4c47ac9b926f6af29576cbc1"
11674
+ integrity sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==
11675
+ dependencies:
11676
+ "@jest/types" "^26.6.2"
11677
+ "@types/node" "*"
11678
+ chalk "^4.0.0"
11679
+ graceful-fs "^4.2.4"
11680
+ is-ci "^2.0.0"
11681
+ micromatch "^4.0.2"
11682
+
11683
jest-util@^29.7.0:
11684
version "29.7.0"
11685
resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc"