Skip to content

refactor: replace console.log with debug utility in tests#494

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-03-chore_client_reduce_verbose_e2e_test_output_with_debug_flag
Dec 3, 2025
Merged

refactor: replace console.log with debug utility in tests#494
graphite-app[bot] merged 1 commit intomainfrom
12-03-chore_client_reduce_verbose_e2e_test_output_with_debug_flag

Conversation

@jumski
Copy link
Copy Markdown
Contributor

@jumski jumski commented Dec 3, 2025

Reduce Test Verbosity with Conditional Debug Logging

This PR introduces a debug logging utility to reduce console noise during test runs while preserving the ability to see detailed logs when needed. Key changes:

  • Added a new debug.ts helper with a log() function that only outputs when DEBUG=1 or VERBOSE=1 environment variables are set
  • Replaced all console.log() calls in E2E tests with the new log() function
  • Updated the global setup script to use the same logging pattern
  • Simplified the global setup output to show only essential information by default

This change makes test output cleaner and more focused on actual test results while maintaining the ability to see detailed logs when debugging by running tests with DEBUG=1.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Dec 3, 2025

⚠️ No Changeset found

Latest commit: 897b1eb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown
Contributor Author

jumski commented Dec 3, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge:queue - adds this PR to the back of the merge queue
  • hotfix:queue - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Dec 3, 2025

View your CI Pipeline Execution ↗ for commit 897b1eb

Command Status Duration Result
nx affected -t verify-exports --base=origin/mai... ✅ Succeeded 4s View ↗
nx affected -t build --configuration=production... ✅ Succeeded 26s View ↗
nx affected -t lint typecheck test --parallel -... ✅ Succeeded 3m 50s View ↗
nx run edge-worker:e2e ✅ Succeeded 2m 48s View ↗
nx run client:e2e ✅ Succeeded 1m 9s View ↗
nx run cli:e2e ✅ Succeeded 4s View ↗
nx run core:pgtap ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2025-12-03 17:36:29 UTC

@graphite-app
Copy link
Copy Markdown
Contributor

graphite-app Bot commented Dec 3, 2025

Merge activity

# Reduce Test Verbosity with Conditional Debug Logging

This PR introduces a debug logging utility to reduce console noise during test runs while preserving the ability to see detailed logs when needed. Key changes:

- Added a new `debug.ts` helper with a `log()` function that only outputs when `DEBUG=1` or `VERBOSE=1` environment variables are set
- Replaced all `console.log()` calls in E2E tests with the new `log()` function
- Updated the global setup script to use the same logging pattern
- Simplified the global setup output to show only essential information by default

This change makes test output cleaner and more focused on actual test results while maintaining the ability to see detailed logs when debugging by running tests with `DEBUG=1`.
@graphite-app graphite-app Bot force-pushed the 12-03-ci_core_extract_pgtap_tests_to_separate_ci_job branch from 03a8ea3 to f9bfb15 Compare December 3, 2025 17:26
@graphite-app graphite-app Bot force-pushed the 12-03-chore_client_reduce_verbose_e2e_test_output_with_debug_flag branch from 4e15458 to 897b1eb Compare December 3, 2025 17:27
@graphite-app graphite-app Bot changed the base branch from 12-03-ci_core_extract_pgtap_tests_to_separate_ci_job to main December 3, 2025 17:36
@graphite-app graphite-app Bot merged commit 897b1eb into main Dec 3, 2025
10 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 3, 2025

🚀 Production Deployment: Website

Successfully deployed to production!

🔗 Production URL: https://pgflow.dev

📝 Details:

  • Commit: 897b1eb93226591585db551374002b11ab202ba8
  • View Logs

Deployed at: 2025-12-03T17:24:42Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant