-
Notifications
You must be signed in to change notification settings - Fork 1
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
Move to Jest and add Svelte Testing Library for component tests #276
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Juholei
changed the title
AE-2005: Add jest etp-front, switch test, tdd and coverage commands t…
AE-2005: Move to Jest and add testing-library/svelte for component tests
Mar 27, 2024
Juholei
changed the title
AE-2005: Move to Jest and add testing-library/svelte for component tests
AE-2005: Move to Jest and add Svelte Testing Library for component tests
Mar 27, 2024
- Testing-library-svelte requires es modules whereas Jest doesn't fully support them which meant that we needed to enable experimental support through node.js flag - Component tests need to be run in jsdom environment, which is set in test file, see H1.test.mjs - Jsdom could be set as the primary test environment, but that broke existing tests that tested code depending on fetch, as that's not available by default in jsdom - Because other test files are rolled through Babel but these component tests need to be es modules, the component test files need to have the extension .mjs to separate them - Jest config needs to now then be common js, so the extension is now .cjs
Juholei
force-pushed
the
jest-test
branch
2 times, most recently
from
April 8, 2024 08:33
3f566a9
to
48de300
Compare
Juholei
changed the title
AE-2005: Move to Jest and add Svelte Testing Library for component tests
Move to Jest and add Svelte Testing Library for component tests
Apr 8, 2024
Windows-käyttäjät voisivat testata muuttuneet npm-skriptit, että toimivathan ne Windowsillakin. |
solita-antti-mottonen
approved these changes
Apr 9, 2024
muep
approved these changes
Apr 9, 2024
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.
Tarkistin nuo uudet package.jsonin skriptit, että toimivat Windowsilla.
- Tests shouldn't be present in coverage themselves, also exclude stories
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.