-
Notifications
You must be signed in to change notification settings - Fork 891
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
Allow singling out a particular test #346
Comments
If someone has good experiences with a test runner module, I'm also definitely open to moving to a proper test framework. (I haven't run into any I liked, but I haven't used a lot.) |
@marijnh That would be great. Personally, I like Mocha, but we could also stick with something as minimal as Tape. However, we still need to use own wrappers for AST comparison in any case. |
For what it's worth, typescript-eslint-parser has recently moved to Jest for testing. Jest has a snapshot feature which may or may not be useful to this project for AST deep-compares. Would that be worth looking into at all? |
@platinumazure I played with snapshots (without Jest) for Acorn tests, but not quite sure yet if it helps - diffs are still way too noisy and now you need to check two places instead of one when updating them, so decided not to proceed for now. |
I'm not a big fan of snapshot testing -- using unvetted possibly wrong output as reference data, and committing huge blobs of that to the repository, feels dirty, and as @RReverser mentions, working with them often gets noisy and awkward. But I'm willing to be convinced if someone has good arguments in favor of it. |
Thanks |
One of the issues I've been having as I'm trying to fix things is that the custom test runner is a bit difficult to work with when trying to focus on a specific issue. After several cycles of commenting out every test except the one I'm working on, I hacked in
testOnly
,testFailOnly
andtestAssertOnly
locally and found that it really helped. Basically, the first one of these wins and all other tests are ignored. Here's the diff:Would you be open to including this in Acorn?
The text was updated successfully, but these errors were encountered: