diff --git a/tests/components/atoms/Avatar.test.ts b/tests/components/atoms/Avatar.test.ts
index 8547d37..8846a33 100644
--- a/tests/components/atoms/Avatar.test.ts
+++ b/tests/components/atoms/Avatar.test.ts
@@ -1,7 +1,7 @@
-import '@testing-library/jest-dom'
-import { render, screen } from '@testing-library/svelte'
+import '@testing-library/jest-dom';
+import { render, screen } from '@testing-library/svelte';
-import Avatar from '../../../src/lib/components/atoms/Avatar.svelte'
+import Avatar from '../../../src/lib/components/atoms/Avatar.svelte';
describe('Avatar.svelte', () => {
it('should mount', () => {
@@ -12,49 +12,49 @@ describe('Avatar.svelte', () => {
const { container } = render(Avatar);
// Assert
- expect(container).toBeTruthy()
- })
+ expect(container).toBeTruthy();
+ });
it('should pick up the passed image', () => {
// Arrange
- const avatar = 'https://example.com/avatar.png'
+ const avatar = 'https://example.com/avatar.png';
// Act
- render(Avatar, { avatar })
- const figure = screen.getByTestId('avatar')
- const image = figure.querySelector('img')
+ render(Avatar, { avatar });
+ const figure = screen.getByTestId('avatar');
+ const image = figure.querySelector('img');
// Assert
- expect(figure).toBeInTheDocument()
- expect(image).not.toBeNull()
- expect(image).toHaveAttribute('src', avatar)
- })
+ expect(figure).toBeInTheDocument();
+ expect(image).not.toBeNull();
+ expect(image).toHaveAttribute('src', avatar);
+ });
it('should use an image with alt text', () => {
// Arrange
- const avatar = 'https://example.com/avatar.png'
- const displayName = 'Jane Doe'
+ const avatar = 'https://example.com/avatar.png';
+ const displayName = 'Jane Doe';
// Act
- render(Avatar, { avatar, displayName })
- const figure = screen.getByTestId('avatar')
+ render(Avatar, { avatar, displayName });
+ const figure = screen.getByTestId('avatar');
// Assert
- expect(figure).toBeInTheDocument()
- expect(screen.getByAltText(displayName)).toBeDefined()
- })
+ expect(figure).toBeInTheDocument();
+ expect(screen.getByAltText(displayName)).toBeDefined();
+ });
it('should use the initials as text', () => {
// Arrange
- const displayName = 'Jane Doe'
- const initials = displayName.substring(0, 2).toUpperCase()
+ const displayName = 'Jane Doe';
+ const initials = displayName.substring(0, 2).toUpperCase();
// Act
- render(Avatar, { displayName })
- const figure = screen.getByTestId('avatar')
+ render(Avatar, { displayName });
+ const figure = screen.getByTestId('avatar');
// Assert
- expect(figure).toBeInTheDocument()
- expect(screen.getByText(initials)).toBeDefined()
- })
-})
+ expect(figure).toBeInTheDocument();
+ expect(screen.getByText(initials)).toBeDefined();
+ });
+});
diff --git a/vitest.config.ts b/vitest.config.ts
index c27f011..b06d7ae 100644
--- a/vitest.config.ts
+++ b/vitest.config.ts
@@ -4,12 +4,9 @@ import { defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [svelte({ hot: !process.env.VITEST })],
test: {
-
- coverage: {
- include: [
- 'src/**/*.svelte'
- ]
- },
+ coverage: {
+ include: ['src/**/*.svelte']
+ },
include: ['tests/**/*.test.ts'],
environment: 'jsdom',
globals: true