René's URL Explorer Experiment


Title: Pino's deprecated prettyPrint and its problem with Jest · Issue #3 · TomDoesTech/Testing-Express-REST-API · GitHub

Open Graph Title: Pino's deprecated prettyPrint and its problem with Jest · Issue #3 · TomDoesTech/Testing-Express-REST-API

X Title: Pino's deprecated prettyPrint and its problem with Jest · Issue #3 · TomDoesTech/Testing-Express-REST-API

Description: I have the solution to this issue, I just wanted to share it. I noticed when working on the previous chapter of this tutorial that pino complains saying that prettyPrint is deprecated for the logger(). (node:54078) [PINODEP008] PinoWarni...

Open Graph Description: I have the solution to this issue, I just wanted to share it. I noticed when working on the previous chapter of this tutorial that pino complains saying that prettyPrint is deprecated for the logge...

X Description: I have the solution to this issue, I just wanted to share it. I noticed when working on the previous chapter of this tutorial that pino complains saying that prettyPrint is deprecated for the logge...

Opengraph URL: https://github.com/TomDoesTech/Testing-Express-REST-API/issues/3

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Pino's deprecated prettyPrint and its problem with Jest","articleBody":"I have the solution to this issue, I just wanted to share it.\r\n\r\nI noticed when working on the previous chapter of this tutorial that pino complains saying that prettyPrint is deprecated for the logger().\r\n\r\n```\r\n(node:54078) [PINODEP008] PinoWarning: prettyPrint is deprecated, look at https://github.com/pinojs/pino-pretty for alternatives.\r\n```\r\n\r\nSo, I found that the preferred method is using a transport option, like so:\r\n\r\nBefore\r\n```\r\nconst log = logger({\r\n  prettyPrint: true,\r\n  base: {\r\n    pid: false,\r\n  },\r\n  timestamp: () =\u003e `,\"time\":\"${dayjs().format()}\"`,\r\n});\r\n```\r\nAfter\r\n```\r\nconst log = logger({\r\n  transport: {\r\n    target: \"pino-pretty\",\r\n    options: {\r\n      colorize: true,\r\n    },\r\n  },\r\n  base: {\r\n    pid: false,\r\n  },\r\n  timestamp: () =\u003e `,\"time\":\"${dayjs().format()}\"`,\r\n});\r\n```\r\n\r\nBut starting on this tutorial for testing I found a head-scratching error faced me when using `--detectOpenHandles`:\r\n```\r\nJest has detected the following 1 open handle potentially keeping Jest from exiting:\r\n\r\n  ●  WORKER\r\n\r\n      4 | const testMode = process.env.NODE_ENV === \"test\";\r\n      5 |\r\n    \u003e 6 | const log = logger({\r\n        |                   ^\r\n```\r\n\r\nAfter a short amount of Googling I found that the transport option was to blame. To check, I restored `prettyPrint: true`, removed `transport: {...}` and the error disappeared.\r\n\r\nI don't know if this is perhaps the best method to fix it, but noticing that the env variable `NODE_ENV` was set when running jest (which is then utilized by `config` to switch to a different config file, `test.js`) I decided to take advantage of it and wrote this adjustment:\r\n\r\n```\r\n// NODE_ENV is set to \"test\" when jest is running.\r\nconst inTest = process.env.NODE_ENV === \"test\";\r\n\r\nconst log = logger({\r\n  enabled: !inTest,\r\n  transport: !inTest ? {\r\n    target: \"pino-pretty\",\r\n    options: {\r\n      colorize: true,\r\n    },\r\n  } : undefined,\r\n  base: {\r\n    pid: false,\r\n  },\r\n  timestamp: () =\u003e `,\"time\":\"${dayjs().format()}\"`,\r\n});\r\n```\r\nThat solved it and I hope this is helpful.","author":{"url":"https://github.com/TiE23","@type":"Person","name":"TiE23"},"datePublished":"2022-04-14T18:57:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/3/Testing-Express-REST-API/issues/3"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:79295a68-8967-2337-7dc0-d8105b4b3cff
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCC6C:F4A23:4617A3:5F556A:698E2178
html-safe-nonce7d45f5f46938da3c27479b813a440695269fe7b86d5aa3b6ee95289e03db98fa
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQzZDOkY0QTIzOjQ2MTdBMzo1RjU1NkE6Njk4RTIxNzgiLCJ2aXNpdG9yX2lkIjoiMTkxNTQzNDk1Nzg5MjU3MDgxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacb9cfc165ca3eae4390696339f06c05c229c9da2fb3215b30ae876d4c9c9efb8f
hovercard-subject-tagissue:1204875984
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/TomDoesTech/Testing-Express-REST-API/3/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f2b62a01c934eb6f180e73d0cc35d197f7ae86626ddcee86837e9af9351920c3/TomDoesTech/Testing-Express-REST-API/issues/3
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f2b62a01c934eb6f180e73d0cc35d197f7ae86626ddcee86837e9af9351920c3/TomDoesTech/Testing-Express-REST-API/issues/3
og:image:altI have the solution to this issue, I just wanted to share it. I noticed when working on the previous chapter of this tutorial that pino complains saying that prettyPrint is deprecated for the logge...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameTiE23
hostnamegithub.com
expected-hostnamegithub.com
None7d71262819a4a68a7786924c05495bfd40a7561e4258dd129ba36f53d667639a
turbo-cache-controlno-preview
go-importgithub.com/TomDoesTech/Testing-Express-REST-API git https://github.com/TomDoesTech/Testing-Express-REST-API.git
octolytics-dimension-user_id82136854
octolytics-dimension-user_loginTomDoesTech
octolytics-dimension-repository_id415179365
octolytics-dimension-repository_nwoTomDoesTech/Testing-Express-REST-API
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id415179365
octolytics-dimension-repository_network_root_nwoTomDoesTech/Testing-Express-REST-API
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release1d904ac995eb43f93014fbdbcc9ae5878653c932
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/TomDoesTech/Testing-Express-REST-API/issues/3#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FTomDoesTech%2FTesting-Express-REST-API%2Fissues%2F3
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FTomDoesTech%2FTesting-Express-REST-API%2Fissues%2F3
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=TomDoesTech%2FTesting-Express-REST-API
Reloadhttps://patch-diff.githubusercontent.com/TomDoesTech/Testing-Express-REST-API/issues/3
Reloadhttps://patch-diff.githubusercontent.com/TomDoesTech/Testing-Express-REST-API/issues/3
Reloadhttps://patch-diff.githubusercontent.com/TomDoesTech/Testing-Express-REST-API/issues/3
TomDoesTech https://patch-diff.githubusercontent.com/TomDoesTech
Testing-Express-REST-APIhttps://patch-diff.githubusercontent.com/TomDoesTech/Testing-Express-REST-API
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FTomDoesTech%2FTesting-Express-REST-API
Fork 78 https://patch-diff.githubusercontent.com/login?return_to=%2FTomDoesTech%2FTesting-Express-REST-API
Star 155 https://patch-diff.githubusercontent.com/login?return_to=%2FTomDoesTech%2FTesting-Express-REST-API
Code https://patch-diff.githubusercontent.com/TomDoesTech/Testing-Express-REST-API
Issues 1 https://patch-diff.githubusercontent.com/TomDoesTech/Testing-Express-REST-API/issues
Pull requests 0 https://patch-diff.githubusercontent.com/TomDoesTech/Testing-Express-REST-API/pulls
Actions https://patch-diff.githubusercontent.com/TomDoesTech/Testing-Express-REST-API/actions
Projects 0 https://patch-diff.githubusercontent.com/TomDoesTech/Testing-Express-REST-API/projects
Security 0 https://patch-diff.githubusercontent.com/TomDoesTech/Testing-Express-REST-API/security
Insights https://patch-diff.githubusercontent.com/TomDoesTech/Testing-Express-REST-API/pulse
Code https://patch-diff.githubusercontent.com/TomDoesTech/Testing-Express-REST-API
Issues https://patch-diff.githubusercontent.com/TomDoesTech/Testing-Express-REST-API/issues
Pull requests https://patch-diff.githubusercontent.com/TomDoesTech/Testing-Express-REST-API/pulls
Actions https://patch-diff.githubusercontent.com/TomDoesTech/Testing-Express-REST-API/actions
Projects https://patch-diff.githubusercontent.com/TomDoesTech/Testing-Express-REST-API/projects
Security https://patch-diff.githubusercontent.com/TomDoesTech/Testing-Express-REST-API/security
Insights https://patch-diff.githubusercontent.com/TomDoesTech/Testing-Express-REST-API/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/TomDoesTech/Testing-Express-REST-API/issues/3
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/TomDoesTech/Testing-Express-REST-API/issues/3
Pino's deprecated prettyPrint and its problem with Jesthttps://patch-diff.githubusercontent.com/TomDoesTech/Testing-Express-REST-API/issues/3#top
https://github.com/TiE23
https://github.com/TiE23
TiE23https://github.com/TiE23
on Apr 14, 2022https://github.com/TomDoesTech/Testing-Express-REST-API/issues/3#issue-1204875984
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.