Skip to content

Categorize tests part 4(CSS, flow, misc)#8251

Merged
fisker merged 1 commit intoprettier:masterfrom
fisker:categorize-tests-4
May 7, 2020
Merged

Categorize tests part 4(CSS, flow, misc)#8251
fisker merged 1 commit intoprettier:masterfrom
fisker:categorize-tests-4

Conversation

@fisker
Copy link
Copy Markdown
Member

@fisker fisker commented May 7, 2020

@fisker fisker changed the title Categorize tests part 4(CSS misc) Categorize tests part 4(CSS, flow, misc) May 7, 2020
@fisker fisker merged commit 7ad5151 into prettier:master May 7, 2020
@fisker fisker deleted the categorize-tests-4 branch May 7, 2020 17:29
@fisker
Copy link
Copy Markdown
Member Author

fisker commented May 7, 2020

@thorn0 All done. You may want make some adjustments?

@fisker fisker mentioned this pull request May 8, 2020
1 task
@thorn0
Copy link
Copy Markdown
Member

thorn0 commented May 10, 2020

I thought we had tests for union and intersection types shared between Flow and TS, but turns out we didn't. If we add such tests, what directory should we put them in?

@fisker
Copy link
Copy Markdown
Member Author

fisker commented May 11, 2020

Maybe js, unlike other languages, I moved original typescript-* in typescript, kind of typescript-only in typescript, flow-only in flow , for example js don't has interface, I don't know where to put it, I moved to js. Do you have good idea?

@thorn0
Copy link
Copy Markdown
Member

thorn0 commented May 11, 2020

I wish I had. All possible solutions seem to be non-obvious for contributors.

@fisker
Copy link
Copy Markdown
Member Author

fisker commented May 11, 2020

Let's think this way, image we don't have inline-comment tests, you want test it in scss now, you should put it in scss/, and I'll say, please add tests in less/ too, or please verify with less parser too. Someday, css support this too, we can add separate tests in css/, or add css parser to tests in scss/.

So union and intersection types, you can

  • put in typescript/ and verify with flow/babel-flow
  • put in flow/ and verify with typescript/babel-ts
  • put duplicated tests in both typescript/ and flow/

I think better in this way.


To enforce this way, I'll update this check https://github.com/prettier/prettier/blob/master/tests_config/utils/check-parsers.js#L15

To something like:

category allowed parsers allowed verify parsers
typescript ["typescript", "babel-ts"] ["babel", "flow", "babel-flow"]
css ["css"] ["scss", "less"]
scss ["scss"] ["css", "less"]
less ["less"] ["css", "scss"]

WDYT?

@fisker fisker mentioned this pull request May 11, 2020
4 tasks
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants