-
Notifications
You must be signed in to change notification settings - Fork 61
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
update ignorePaths logic #72
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
test.js
Outdated
@@ -1001,7 +1002,8 @@ experiment('ignore request logs for paths in ignorePaths', () => { | |||
resolver = resolve | |||
}) | |||
const stream = sink((data) => { | |||
expect(data.req.url).to.not.equal('/ignored') | |||
const url = new URL(data.req.url) | |||
expect(url.pathname).to.equal('/') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering why these tests where passing before. Did you get a clue on why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data.req.url
was undefined
, so it passed because it wasn't /ignored
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, not undefined, but it was a full URL (http://colins-macbook-pro.local:0/)
@cjihrig tests are failing with Hapi@17: https://travis-ci.org/pinojs/hapi-pino/jobs/490787436. |
According to the hapi 18 release notes, request.url.path has gone away in favor of request.path or request.url.pathname. The same release notes also state that request.url.pathname has not changed. Refs: hapijs/hapi#3871
@mcollina pushed up something that should fix it |
Thanks! |
According to the hapi 18 release notes,
request.url.path
has gone away in favor ofrequest.path
orrequest.url.pathname
. The same release notes also state thatrequest.url.pathname
has not changed.Refs: hapijs/hapi#3871