-
Notifications
You must be signed in to change notification settings - Fork 85
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
chore: auto-generate Lit test files #8561
Conversation
f29a54c
to
7294d27
Compare
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 like the idea, seems to work well locally. Looks like CI actions didn't run with the latest changes, so would require checking if there is an actual issue there.
scripts/generateLitTests.js
Outdated
return !/(-polymer|-lit)(\.generated)?\.test/u.test(testPath); | ||
}) | ||
.forEach((testPath) => { | ||
console.log(testPath); |
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.
Could be moved into the if condition below so this only gets logged if the symlink doesn't exist yet. Otherwise it creates noise on every test run.
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, it's actually a leftover from the development. I'll remove it completely.
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.
Removed.
|
Hi @vursen and @vursen, when i performed cherry-pick to this commit to 24.5, i have encountered the following issue. Can you take a look and pick it manually? |
Co-authored-by: Sergey Vinogradov <[email protected]>
Co-authored-by: Sergey Vinogradov <[email protected]>
Co-authored-by: Vaadin Bot <[email protected]>
This ticket/PR has been released with Vaadin 24.7.0.alpha7 and is also targeting the upcoming stable 24.7.0 version. |
Description
The PR introduces automatic generation of Lit test files using symlinks:
generateLitTests
script creates[name]-lit.generated.test.js
symlinks for[name].test.js
test files for components that have a Lit version. This effectively causes web-test-runner to run the same file twice while displaying them as separate files in the list of test files, which preserves the ability to open and debug these files separately.[name]-lit.generated.test.js
.-lit.test.js
and-polymer.test.js
, which makes it possible to transition back to a single test file approach gradually.Type of change