Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allows debug calls prior to instantiation #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

audishos
Copy link

deletes debug module caches and reloads debug

deletes debug module caches and reloads debug
@codecov-commenter
Copy link

codecov-commenter commented Jun 10, 2020

Codecov Report

Merging #28 into master will decrease coverage by 8.00%.
The diff coverage is 54.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #28      +/-   ##
==========================================
- Coverage   98.00%   90.00%   -8.00%     
==========================================
  Files           2        2              
  Lines          50       60      +10     
==========================================
+ Hits           49       54       +5     
- Misses          1        6       +5     
Impacted Files Coverage Δ
index.js 86.95% <54.54%> (-10.27%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eccac78...ae5acf7. Read the comment docs.

@mcollina
Copy link
Member

Good work, would you mind to add a unit test?

@audishos
Copy link
Author

audishos commented Jun 12, 2020

Hmmm. I'm not exactly sure what I'm doing wrong here. It's throwing within the test and failing, but not when I implement it in my project. Any thoughts?

test('allows calls to debug before calling pinoDebug', (t) => {
  var debug = require('debug')('ns')
  debug('test')
  t.doesNotThrow(() => require('../'))
  t.end()
})

@jmealo
Copy link

jmealo commented Sep 7, 2022

Looking at this it makes it seem like we'd need an ESM compatible pino-debug and a CommonJS one.

mcollina
mcollina previously approved these changes Sep 7, 2022
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina dismissed their stale review September 7, 2022 20:06

wrong, the test is still missing

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.

None yet

4 participants