-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
test: add infer-parser tests #30
base: main
Are you sure you want to change the base?
Conversation
}); | ||
|
||
// TODO (43081j): in prettier, this tests that it exits with 0 for | ||
// whatever reason. should we do the same? |
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.
we need to decide what the right behaviour is here
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.
I suggest we add a fourth internal only "main" flag/command called "dump" or "echo" or something like that, which we consider enabled when the other 3 ones aren't, and we use that to decide what to output exactly, and we largely align ourselves with Prettier v3.
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.
Just mentioning it here that this forth "mode" exists internally now, I called it "dump".
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. |
Adds the `infer-parser` tests from prettier. Also updates the `runCLI` util to only execute the binary once a test actually runs.
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.