-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat(DRAFT): reintroduce adder tests #32
base: main
Are you sure you want to change the base?
Conversation
commit: |
This reverts commit 5dab2ef.
// the containers take some time to startup and be ready | ||
// to accept any connections. As there is no standard / easy | ||
// way of doing this for different containers (mysql / postgres) | ||
// we are waiting for them to startup | ||
await new Promise((x) => setTimeout(x, 15000)); |
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.
This is a wild one, if you have an idea on how to improve this, please let me know.
We did not had these problems in svelte-add
, though this was sheer luck. In svelte-add
starting the docker containers was the first thing we did, even before preparing the test environment. During this time the containers had the time to boot up properly.
I do think moving it here overweight's the drawback this brings
@AdrianGonz97 Update the PR description, you should now be able to start a review here if you like. And if you have any idea about the linting issue, this would be highly appreciated. |
Note the change in #76 may require some additional checks here |
This will require rather dramatic rebasing some time after summit |
This reintroduces the adder tests previously in
svelte-add
, now with significant enhancements:playwright
.Notes:
packages\adder-tests\_snapshots
andcommunity-adder-template\_snapshot
, mirroring the structure of the test output directories.vitest
functions (refer to: https://github.com/sveltejs/cli/blob/1532153aa16f164bb0d67ef735b2a099e8424bb6/packages/adder-tests/tests/official/end2end.ts) is intentional. The goal is to keep@svelte-cli/adder-testing-library
as a standalone package for npm, aiding community adders. Thus, incorporating our test execution within@svelte-cli/adder-testing-library
isn't viable. Moreover,vitest
doesn't recognize tests within the current package if they're innode_modules
.beforeAll
andbeforeEach
test hooks have been introduced, along with their counterparts for after. This allows, for example, the drizzle adder to manage docker containers independently.Remaining tasks:
eslint
, which is producing an unclear error message.vitest
concerns, particularly regarding snapshots. (they probably arise because the snapshot files are not present. They are created locally on the fly, but probably not in CI)Future enhancements (beyond the scope of this update):
sv
, among other checks.storybook
adder. Currently, applying the storybook adder to five different projects takes approximately 1.5 minutes, accounting for about 25% of the total test time.