-
-
Notifications
You must be signed in to change notification settings - Fork 8
test: add infer-parser tests #30
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
7eff677
to
d2ecee5
Compare
depends on #33 now |
988b7a6
to
67c31b2
Compare
d2ecee5
to
c8811cf
Compare
0c953fb
to
ada6549
Compare
#33 got fixed, let me know when we should be ready for merging this. |
b7e80e4
to
4ef2b89
Compare
Blocked by #51 |
@@ -182,7 +182,7 @@ async function runGlobs(options: Options, pluginsDefaultOptions: PluginsOptions, | |||
const filePath = filesPathsTargets[i]; | |||
const fileRelativePath = fastRelativePath(rootPath, filePath); | |||
//TODO: Make sure the error is syntax-highlighted when possible | |||
if (options.check || options.write) { | |||
if (options.check || options.write || options.dump) { |
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.
importantly , this changed
this is what makes errors now log out when you're in dump mode (the same as prettier)
34e0257
to
f8dc396
Compare
#51 was addressed, do we need anything else for this PR? |
Adds the `infer-parser` tests from prettier. Also updates the `runCLI` util to only execute the binary once a test actually runs.
4ef2b89
to
7f0d9c6
Compare
this should now be good to go I also fixed some unrelated snapshots, e.g. the version changing caused snapshots to fail so I replaced it with the difference to note with prettier is that we don't log errors for files which have an unknown parser. we just skip them, and show that in debug logs but not in normal output |
Thanks! |
Reminder: the tests fail on Windows https://github.com/prettier/prettier-cli/actions/runs/15008796631/job/42173501009 . Maybe better keep the By the way @fabiospampinato, why are we removing PR number in commit message? It's hard to find linked PR. |
Yeah that has to be fixed. Or were only the tests from this PR failing on Windows? I should have checked that.
I normally just write the commit message that I would have written as if the PR didn't exist. Do you want the PR number mentioned in the message? Or is the description fine? |
Anywhere is good. |
Just this one now. |
Oh I messed it up then 🤔 @43081j could you have a look at why that is? |
Adds the
infer-parser
tests from prettier.Also updates the
runCLI
util to only execute the binary once a test actually runs.