mirror of
https://github.com/LucasVbr/game-lib.git
synced 2026-05-13 17:21:51 +00:00
5d8f9303ae
- Added package.json for project dependencies and scripts - Created Playwright configuration for end-to-end testing - Set up Inlang project settings for localization - Defined app types in app.d.ts - Created basic HTML structure in app.html - Implemented server hooks for localization in hooks.server.ts - Added hooks for URL rerouting in hooks.ts - Included favicon asset - Established library index for $lib alias - Developed Vitest example components and tests - Created layout and page components for routing - Implemented demo pages for Paraglide and Playwright - Added global CSS styles for layout - Configured Vite for project build and testing - Included robots.txt for web crawling instructions - Set up TypeScript configuration for the project
16 lines
527 B
TypeScript
16 lines
527 B
TypeScript
import { page } from 'vitest/browser';
|
|
import { describe, expect, it } from 'vitest';
|
|
import { render } from 'vitest-browser-svelte';
|
|
import Welcome from './Welcome.svelte';
|
|
|
|
describe('Welcome.svelte', () => {
|
|
it('renders greetings for host and guest', async () => {
|
|
render(Welcome, { host: 'SvelteKit', guest: 'Vitest' });
|
|
|
|
await expect
|
|
.element(page.getByRole('heading', { level: 1 }))
|
|
.toHaveTextContent('Hello, SvelteKit!');
|
|
await expect.element(page.getByText('Hello, Vitest!')).toBeInTheDocument();
|
|
});
|
|
});
|