Closed ciaranmcnulty closed 3 years ago
I can't particularly see a test to add aside from adding some fixtures (which would be duplicating the cucumber test)
if the cucumber tests cover that already, that's already enough to cover it IMO
I definitely felt the need for more lower-level tests here. Perhaps the various Protected methods inside the Lexer could be promoted into objects and tested more thoroughly?
For instance the meat of scanPyStringOp
could be tested fairly comprehensively
I don't think these methods should be promoted (I don't even think they should be protected btw). That would couple tests to the exact implementation of the parsing. To me, this should be covered by feeding more valid and invalid inputs to the parser instead (which would then outlive any refactoring of the parsing implementation). And such inputs should ideally be contributed upstream rather than be kept in our repo (if they are not there already) so that official gherkin parsers also benefit from these tests (and we are sure that we have the same behavior).
Cool. Contributing to the upstream tests is slightly harder than it could be, but the documentation has recently improved so I'll be adding some in
Closes #155