-
-
Notifications
You must be signed in to change notification settings - Fork 223
svelte2tsx/test #737
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
svelte2tsx/test #737
Conversation
dummdidumm
left a comment
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.
These are good changes! I left some minor refactoring comments in there. Also it seems that you used tabs instead of spaces throughout. I don't know if you use prettier, but if you do, it should pick up the configuration if you open the workspace from the root.
packages/svelte2tsx/test/helpers.js
Outdated
| for (const name of unchecked) | ||
| if (name === fileName || (name.startsWith("*") && fileName.endsWith(name.slice(1)))) { | ||
| unchecked.delete(name); | ||
| continue a; |
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.
Can we remove that continue statement and make the other if an else if instead?
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 restructured it and corrected some things but I don't think you can get much better due to the wildcard thing
Ah, svelte2tsx/test was in |
Could you alter it so that the tsx/jsx files are ignored? Otherwise it might be very cumbersome to change these files. |
dummdidumm
left a comment
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.
Thanks!
Extracted
htmlx2jsxandsvelte2tsxtests common code into atest_samplefunction inhelpers.jsAdded check for random unused files in samples (warns locally, throws in CI)
Added auto generation of the expected output if absent (marks test as skipped and logs a notice at the end locally, throws in CI)
Made samples starting with a dot show up as skipped tests instead of silent
Made the
htmlxparsertimeout test generate its input dynamicallyRemoved checks for
.solofolders in 3 places for a single CI-only match-all glob in index