I spotted an experimental vitest addon and configured most parts of it.
However due to given peer dependency in that addon I cannot install it.
Therefore everything was commented for now.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
Turns out most Storybook Addons expect React and won't be installable in
a Svelte(Kit) project. But I could figure out how to use the play
functions. So I have an example for it.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
I'm going to break up my MainMenu into smaller components, starting with
the OverlayAvatar. Testing it taught me how to handle stores in Vitest.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
This allows for proper testing and documentation in Storybook.
I also moved the image into its own component. This required me to
adjust the vitest.config.ts slightly because it wasn't finding the image
during tests.
Since components are fully translatable, this means we have new keys
now.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
This required adding annotation to the whole project.
I need to double-check whether I have the license banner of AGPL in
place everywhere.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
For now I'm following the Atomic Design philosophy with respect to
organising the components. I started with Avatar which wraps the
SvelteKit library with some defaults. I test it using vitest which is
now configured accordingly. All dependencies were updated to their
latest version.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>