-
Notifications
You must be signed in to change notification settings - Fork 750
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
Should tests check for error tokens? #929
Comments
This is exactly why I submitted #852 :) |
This contribution has been automatically marked as stale because it has not had any activity for more than a year. It will be closed if no additional activity occurs within the next 14 days. |
@dblessing I don't think it should be a problem if samples include an error. Not sure if @jneen or @gfx feel differently. |
This issue has been automatically marked as stale because it has not had any activity for more than a year. It will be closed if no additional activity occurs within the next 14 days. |
Having had the benefit of working on this codebase for a year, I'm confident the answer to this should be no. There are samples that intentionally include errors to check the way error tokens work. |
When reviewing a PR I noticed there was an error token in the sample for the Nix lexer. I originally thought the change caused it so I tested on master, but the problem still existed. I thought automated testing was ensuring there were no error tokens.
When I look at specs it looks like we assert no errors for the demo, but not the sample. Samples we only check to see if it throws an exception.
Are tests supposed to catch error tokens in samples? @gfx @jneen
The text was updated successfully, but these errors were encountered: