#4 Added set of unit tests to ensure functionality of currently implemented behaviour
Some checks failed
Run Unit and Integration Tests / test (pull_request) Failing after 41s
Run Unit and Integration Tests / test (push) Failing after 1m27s

This commit is contained in:
2025-06-28 18:02:02 +01:00
parent a3ab910608
commit dc7ecc0cdb
5 changed files with 317 additions and 272 deletions

View File

@@ -0,0 +1,12 @@
import { render } from '@testing-library/svelte';
import { describe, it, expect } from 'vitest';
import Page from './+page.svelte';
describe('Main Page', () => {
it('renders the page without HTTP error codes', () => {
const { container } = render(Page);
// Check that common HTTP error codes are not present in the rendered output
const html = container.innerHTML;
expect(html).not.toMatch(/404|500|403|401|bad request|not found|internal server error/i);
});
});