-
Notifications
You must be signed in to change notification settings - Fork 2k
Fix 'path' argument. Add more visitor tests #1149
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
Conversation
@leebyron I added the simple test for Is it intentional behavior or a bug? |
}, | ||
}); | ||
|
||
console.log(JSON.stringify(visited, null, 2)); |
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.
Probably don't want to keep this console.log in the test
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.
@mjmahone Consequences of committing at 3 AM 😄
Removed.
@@ -17,6 +17,35 @@ import { testSchema } from '../../validation/__tests__/harness'; | |||
import { getNamedType, isCompositeType } from '../../type'; | |||
|
|||
describe('Visitor', () => { | |||
it('check path argument', () => { |
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.
nit: 'validates path argument' or 'checks path argument'
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.
@mjmahone Thanks 👍 Fixed now.
d61b575
to
4ba0dae
Compare
I fixed As for testing visitor callback arguments, I decided it's too much to add to hardcoded snapshots inside tests. So I added One thing to note is the current implementation of |
Nice work, @IvanGoncharov |
As discussed in #1145 I started to work on tests for
visit
function.