Ver código fonte

test: vitest shows console output only for failing tests (silent: 'passed-only' in vitest.config.ts, so Docker runs are quiet too); test_frontend.sh back to npm run test:run

maziggy 1 dia atrás
pai
commit
e290a57c84
2 arquivos alterados com 4 adições e 2 exclusões
  1. 3 0
      frontend/vitest.config.ts
  2. 1 2
      test_frontend.sh

+ 3 - 0
frontend/vitest.config.ts

@@ -14,6 +14,9 @@ export default defineConfig({
     },
     setupFiles: ['./src/__tests__/setup.ts'],
     testTimeout: 10000,
+    // Console output only from failing tests (Docker, test_frontend.sh and
+    // plain runs alike); pass --silent=false to see a passing test's logs.
+    silent: 'passed-only',
     include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
     exclude: ['node_modules', 'dist'],
     coverage: {

+ 1 - 2
test_frontend.sh

@@ -22,8 +22,7 @@ knip_rc=$?
 cat /tmp/bambuddy-typecheck.$$ /tmp/bambuddy-lint.$$ /tmp/bambuddy-knip.$$
 rm -f /tmp/bambuddy-typecheck.$$ /tmp/bambuddy-lint.$$ /tmp/bambuddy-knip.$$
 
-# Console output of passing tests is hidden; a failing test still shows its own.
-npx vitest run --silent=passed-only && npm run check:i18n
+npm run test:run
 test_rc=$?
 
 # The production build and its browser baseline check, into a temporary